diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-05-30 23:49:06 +0200 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-05-30 23:49:06 +0200 |
commit | 3ef6029764cfcba7e73bf62c19addbe1732480b8 (patch) | |
tree | ff4354c0a3056af8f580356787982021edf62963 /src/General.h | |
parent | added CText (diff) | |
download | re3-3ef6029764cfcba7e73bf62c19addbe1732480b8.tar re3-3ef6029764cfcba7e73bf62c19addbe1732480b8.tar.gz re3-3ef6029764cfcba7e73bf62c19addbe1732480b8.tar.bz2 re3-3ef6029764cfcba7e73bf62c19addbe1732480b8.tar.lz re3-3ef6029764cfcba7e73bf62c19addbe1732480b8.tar.xz re3-3ef6029764cfcba7e73bf62c19addbe1732480b8.tar.zst re3-3ef6029764cfcba7e73bf62c19addbe1732480b8.zip |
Diffstat (limited to 'src/General.h')
-rw-r--r-- | src/General.h | 4 |
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)); } }; |