generate random numbers as floats
as they get converted from double before use anyway
This commit is contained in:
@@ -127,7 +127,7 @@ namespace OpenRA
|
||||
|
||||
public static float Gauss1D(this Thirdparty.Random r, int samples)
|
||||
{
|
||||
return Exts.MakeArray(samples, _ => (float)r.NextDouble() * 2 - 1f)
|
||||
return Exts.MakeArray(samples, _ => r.NextFloat() * 2 - 1f)
|
||||
.Sum() / samples;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user