1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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:
kwolekr 2015-04-29 13:20:01 -04:00
parent b6475f5448
commit 37ca3212ee
4 changed files with 14 additions and 20 deletions

View file

@ -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);
}
///////////////////////////////////////////////////////////////////////////////