From a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d Mon Sep 17 00:00:00 2001 From: "Walied K. Yassen" Date: Sun, 29 Nov 2020 09:14:15 +0200 Subject: Implement MI_BEACHBALL behaviours --- src/core/General.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/General.h') 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); } }; -- cgit v1.2.3