summaryrefslogtreecommitdiffstats
path: root/src/General.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-30 00:47:33 +0200
committeraap <aap@papnet.eu>2019-05-30 00:47:33 +0200
commit0a36d49d2cd4346dc99a52155e2599917c1e6a42 (patch)
tree9d07fa357fca32b4dfa56b6f52584fdf2c349a30 /src/General.h
parentMerge pull request #2 from Fire-Head/master (diff)
downloadre3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.gz
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.bz2
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.lz
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.xz
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.zst
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.zip
Diffstat (limited to 'src/General.h')
-rw-r--r--src/General.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/General.h b/src/General.h
index d67b1ff0..aa52bf4d 100644
--- a/src/General.h
+++ b/src/General.h
@@ -1,5 +1,4 @@
-
-
+#pragma once
class CGeneral
{
@@ -46,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()/float(MY_RAND_MAX + 1)); }
+ { return low + (high - low)*(GetRandomNumber()/65536.0f); }
static Int32 GetRandomNumberInRange(Int32 low, Int32 high)
- { return low + (high - low)*(GetRandomNumber()/float(MY_RAND_MAX + 1)); }
+ { return low + (high - low)*(GetRandomNumber()/65536.0f); }
};