8,756
edits
mNo edit summary |
m (→GaussianRandom(float Mean, float StandardDeviation): i remembered what gaussian was.) |
||
Line 37: | Line 37: | ||
double num = Math.Sqrt(-2.0 * Math.Log(Stat.Rnd.NextDouble())) * Math.Sin(2.0 * Math.PI * Stat.Rnd.NextDouble()); | double num = Math.Sqrt(-2.0 * Math.Log(Stat.Rnd.NextDouble())) * Math.Sin(2.0 * Math.PI * Stat.Rnd.NextDouble()); | ||
return (double) Mean + (double) StandardDeviation * num; | return (double) Mean + (double) StandardDeviation * num; | ||
</syntaxhighlight> | </syntaxhighlight>Returns a random float around the mean with a probability density of a normal distribution. | ||
===RandomCosmetic(int low, int high)=== | ===RandomCosmetic(int low, int high)=== |