NatFloat: Difference between revisions

From Vintage Story Wiki
(Created page with "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 am...")
 
No edit summary
Line 3: Line 3:
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.
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.


  Distributions
 
[[File:Natfloat-uniform.png]]
[[File:Natfloat-uniform.png]]
[[File:Natfloat-triangle.png]]
[[File:Natfloat-triangle.png]]
Line 10: Line 9:
[[File:Natfloat-narrowgauss.png]]
[[File:Natfloat-narrowgauss.png]]
[[File:Natfloat-verynarrowgauss.png]]
[[File:Natfloat-verynarrowgauss.png]]
<br>
[[File:Natfloat-invgaus.png]]
[[File:Natfloat-invgaus.png]]
[[File:Natfloat-narrowinvgaus.png]]
[[File:Natfloat-narrowinvgaus.png]]

Revision as of 07:38, 26 March 2019

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