summaryrefslogtreecommitdiffstats
path: root/src/core/General.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-08-10 09:44:19 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-08-10 09:44:19 +0200
commit0303955de32876860bea8ed0db31f398d73c2073 (patch)
tree474dd18a7e71ceb24ee757bcfadf5d0595a3f880 /src/core/General.h
parentMerge pull request #183 from Nick007J/master (diff)
downloadre3-0303955de32876860bea8ed0db31f398d73c2073.tar
re3-0303955de32876860bea8ed0db31f398d73c2073.tar.gz
re3-0303955de32876860bea8ed0db31f398d73c2073.tar.bz2
re3-0303955de32876860bea8ed0db31f398d73c2073.tar.lz
re3-0303955de32876860bea8ed0db31f398d73c2073.tar.xz
re3-0303955de32876860bea8ed0db31f398d73c2073.tar.zst
re3-0303955de32876860bea8ed0db31f398d73c2073.zip
Diffstat (limited to 'src/core/General.h')
-rw-r--r--src/core/General.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/General.h b/src/core/General.h
index 7c0c9562..351243be 100644
--- a/src/core/General.h
+++ b/src/core/General.h
@@ -98,6 +98,8 @@ public:
// not too sure about all these...
static uint16 GetRandomNumber(void)
{ return myrand() & MYRAND_MAX; }
+ static bool GetRandomTrueFalse(void)
+ { return GetRandomNumber() < MYRAND_MAX / 2; }
// Probably don't want to ever reach high
static float GetRandomNumberInRange(float low, float high)
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }