summaryrefslogtreecommitdiffstats
path: root/src/General.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/General.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/General.h b/src/General.h
index aa52bf4d..f957ab2f 100644
--- a/src/General.h
+++ b/src/General.h
@@ -45,8 +45,8 @@ public:
{ return myrand() & 0xFFFF; }
// Probably don't want to ever reach high
static float GetRandomNumberInRange(float low, float high)
- { return low + (high - low)*(GetRandomNumber()/65536.0f); }
+ { return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
static Int32 GetRandomNumberInRange(Int32 low, Int32 high)
- { return low + (high - low)*(GetRandomNumber()/65536.0f); }
+ { return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
};