summaryrefslogtreecommitdiffstats
path: root/src/core/General.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/General.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/General.h b/src/core/General.h
index 7e06b96e..52850794 100644
--- a/src/core/General.h
+++ b/src/core/General.h
@@ -159,6 +159,11 @@ public:
static int32 GetRandomNumberInRange(int32 low, int32 high)
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
+
+ // Returns inclusive value in the specified range
+ static int32 GetRandomNumberInRangeInc(int32 low, int32 high)
+ { return GetRandomNumberInRange(low - 1, high + 1); }
+
static void SetRandomSeed(int32 seed)
{ mysrand(seed); }
};