Table of Contents

Class EvolvingNatFloat

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll

A number generator whose return value changes over time, parametrized by a transform function and some constants

[JsonObject(MemberSerialization.OptIn)]
public class EvolvingNatFloat
Inheritance
EvolvingNatFloat
Inherited Members
Extension Methods

Constructors

EvolvingNatFloat()

public EvolvingNatFloat()

EvolvingNatFloat(EnumTransformFunction, float)

public EvolvingNatFloat(EnumTransformFunction transform, float factor)

Parameters

transform EnumTransformFunction
factor float

Properties

Factor

public float Factor { get; }

Property Value

float

MaxValue

public float? MaxValue { get; }

Property Value

float?

Transform

public EnumTransformFunction Transform { get; }

Property Value

EnumTransformFunction

Methods

Clone()

public EvolvingNatFloat Clone()

Returns

EvolvingNatFloat

CreateFromBytes(BinaryReader)

public static EvolvingNatFloat CreateFromBytes(BinaryReader reader)

Parameters

reader BinaryReader

Returns

EvolvingNatFloat

FromBytes(BinaryReader)

public void FromBytes(BinaryReader reader)

Parameters

reader BinaryReader

ToBytes(BinaryWriter)

public void ToBytes(BinaryWriter writer)

Parameters

writer BinaryWriter

create(EnumTransformFunction, float)

public static EvolvingNatFloat create(EnumTransformFunction function, float factor)

Parameters

function EnumTransformFunction
factor float

Returns

EvolvingNatFloat

createIdentical(float)

public static EvolvingNatFloat createIdentical(float factor)

Parameters

factor float

Returns

EvolvingNatFloat

nextFloat(float, float)

The sequence should always run from 0 to n

public float nextFloat(float firstvalue, float sequence)

Parameters

firstvalue float
sequence float

Returns

float