summaryrefslogtreecommitdiffstats
path: root/src/core/General.h
diff options
context:
space:
mode:
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)); }