generate random numbers as floats
as they get converted from double before use anyway
This commit is contained in:
2
OpenRA.FileFormats/Thirdparty/Random.cs
vendored
2
OpenRA.FileFormats/Thirdparty/Random.cs
vendored
@@ -49,7 +49,7 @@ namespace OpenRA.Thirdparty
|
||||
|
||||
public int Next(int low, int high) { return low + Next() % (high - low); }
|
||||
public int Next(int high) { return Next() % high; }
|
||||
public double NextDouble() { return Math.Abs(Next() / (double)0x7fffffff); }
|
||||
public float NextFloat() { return Math.Abs(Next() / (float)0x7fffffff); }
|
||||
|
||||
void Generate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user