NatFloat

From Vintage Story Wiki
Revision as of 09:00, 26 March 2019 by Tyron (talk | contribs)

A somewhat more natural random number generator.

If you create 8000 random numbers between 0..200 and plot them, where the X-Axis is the resulting value and the Y-Axis the amount of times this value was returned then you can see how the random number generator behaves. These are some simple plots for all distributions. Uniform is just your normal average random number generator.

Natfloat-uniform.png Natfloat-triangle.png Natfloat-gauss.png Natfloat-narrowgauss.png Natfloat-verynarrowgauss.png

Natfloat-invgaus.png Natfloat-narrowinvgaus.png Natfloat-invexp.png Natfloat-stronginvexp.png Natfloat-stronverinvexp.png

Translated to the Natfloat arguments the horizontal center point in these graphs denote the "avg" value, the width of the plot is determined by the "var" value. In json, these plots would be in the shape of
{ avg: 100, var: 100, dist: "uniform" }