diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-05-31 00:49:06 +0300 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-05-31 00:49:06 +0300 |
commit | 3ef6029764cfcba7e73bf62c19addbe1732480b8 (patch) | |
tree | ff4354c0a3056af8f580356787982021edf62963 /src/General.h | |
parent | 2bf6674afc6b3a243f536fb30e313b055b35d533 (diff) |
fixed CParticle crash && RandTable
implemented PC codewarrior rand
updated premake
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)); } }; |