diff options
author | aap <aap@papnet.eu> | 2019-08-11 22:15:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-11 22:15:31 +0200 |
commit | b7471489faaae864c953aac45e58417d7236329d (patch) | |
tree | 439de47b03e154a068f920274f5211d44c418dcc /src/core/General.h | |
parent | Merge pull request #185 from erorcun/erorcun (diff) | |
parent | more CCarCtrl (diff) | |
download | re3-b7471489faaae864c953aac45e58417d7236329d.tar re3-b7471489faaae864c953aac45e58417d7236329d.tar.gz re3-b7471489faaae864c953aac45e58417d7236329d.tar.bz2 re3-b7471489faaae864c953aac45e58417d7236329d.tar.lz re3-b7471489faaae864c953aac45e58417d7236329d.tar.xz re3-b7471489faaae864c953aac45e58417d7236329d.tar.zst re3-b7471489faaae864c953aac45e58417d7236329d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/General.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/General.h b/src/core/General.h index 12f781d4..8f9aa044 100644 --- a/src/core/General.h +++ b/src/core/General.h @@ -114,6 +114,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)); } |