summaryrefslogtreecommitdiff
path: root/src/noise.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-04-29 13:20:01 -0400
committerkwolekr <kwolekr@minetest.net>2015-04-29 13:20:01 -0400
commit37ca3212eee6d70a54493168014f9254cc6e8f37 (patch)
treec2589b164fb280efa27832c4d3cfc8655c2b2ea7 /src/noise.cpp
parentb6475f54487690e23cf9541a68f98649edb8f0e0 (diff)
downloadminetest-37ca3212eee6d70a54493168014f9254cc6e8f37.tar.gz
minetest-37ca3212eee6d70a54493168014f9254cc6e8f37.tar.bz2
minetest-37ca3212eee6d70a54493168014f9254cc6e8f37.zip
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
Diffstat (limited to 'src/noise.cpp')
-rw-r--r--src/noise.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/noise.cpp b/src/noise.cpp
index 614234aa4..7a23819c8 100644
--- a/src/noise.cpp
+++ b/src/noise.cpp
@@ -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);
}
///////////////////////////////////////////////////////////////////////////////