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
EnumTransformFunctionfactor
float
Properties
Factor
public float Factor { get; }
Property Value
MaxValue
public float? MaxValue { get; }
Property Value
Transform
public EnumTransformFunction Transform { get; }
Property Value
Methods
Clone()
public EvolvingNatFloat Clone()
Returns
CreateFromBytes(BinaryReader)
public static EvolvingNatFloat CreateFromBytes(BinaryReader reader)
Parameters
reader
BinaryReader
Returns
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
EnumTransformFunctionfactor
float
Returns
createIdentical(float)
public static EvolvingNatFloat createIdentical(float factor)
Parameters
factor
float
Returns
nextFloat(float, float)
The sequence should always run from 0 to n
public float nextFloat(float firstvalue, float sequence)