From 37ca3212eee6d70a54493168014f9254cc6e8f37 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Wed, 29 Apr 2015 13:20:01 -0400 Subject: 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 --- src/noise.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/noise.cpp') 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); } /////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3