Table of Contents

Class NatFloat

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll

A more natural random number generator (nature usually doesn't grow by the exact same numbers nor does it completely randomly)

public class NatFloat
Inheritance
NatFloat

Examples

"quantity": {
	"dist": "strongerinvexp",
	"avg": 6,
	"var": 4
}
"quantity": {
	"avg": 4,
 "var": 2
}

Fields

avg (Recommended) (Default: 0)

The average value for the random float.

public float avg

Field Value

float

var (Recommended) (Default: 0)

The variation for the random float.

public float var

Field Value

float

dist (Optional) (Default: UNIFORM)

The type of distribution to use that determines the commodity of values.

public EnumDistribution dist

Field Value

EnumDistribution

offset (Optional) (Default: 0)

A full offset to apply to any values returned.

public float offset

Field Value

float