summaryrefslogtreecommitdiffstats
path: root/src/General.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-30 23:55:48 +0200
committerGitHub <noreply@github.com>2019-05-30 23:55:48 +0200
commita991c99b3a4537c082177c690f4b75001787f913 (patch)
treeff4354c0a3056af8f580356787982021edf62963 /src/General.h
parentadded CText (diff)
parentfixed CParticle crash && RandTable (diff)
downloadre3-a991c99b3a4537c082177c690f4b75001787f913.tar
re3-a991c99b3a4537c082177c690f4b75001787f913.tar.gz
re3-a991c99b3a4537c082177c690f4b75001787f913.tar.bz2
re3-a991c99b3a4537c082177c690f4b75001787f913.tar.lz
re3-a991c99b3a4537c082177c690f4b75001787f913.tar.xz
re3-a991c99b3a4537c082177c690f4b75001787f913.tar.zst
re3-a991c99b3a4537c082177c690f4b75001787f913.zip
Diffstat (limited to 'src/General.h')
-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)); }
};