mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Fix MSVC compatibility
Make sure to include random unittests in android builds, too Use SWAP() macro Ensure that negative ranges are tested as well in random unittests
This commit is contained in:
@@ -148,7 +148,7 @@ s32 PcgRandom::randNormalDist(s32 min, s32 max, int num_trials)
|
||||
s32 accum = 0;
|
||||
for (int i = 0; i != num_trials; i++)
|
||||
accum += range(min, max);
|
||||
return round((float)accum / num_trials);
|
||||
return myround((float)accum / num_trials);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user