From d62c6165459048c1a616d0e056e25e366b09c505 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 4 Jul 2019 23:10:04 +0200 Subject: fixed rand (thanks nick) --- src/General.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/General.h') diff --git a/src/General.h b/src/General.h index d315d50b..cae1caa0 100644 --- a/src/General.h +++ b/src/General.h @@ -4,10 +4,6 @@ class CGeneral { public: static float GetATanOfXY(float x, float y){ -// why exactly doesn't this work? -// if(y >= 0.0f) return atan2(x, y); -// return atan2(x, y) + 2*M_PI; - if(x == 0.0f && y == 0.0f) return 0.0f; float xabs = fabs(x); @@ -85,7 +81,7 @@ public: // not too sure about all these... static uint16 GetRandomNumber(void) - { return myrand() & 0xFFFF; } + { return myrand() & MYRAND_MAX; } // Probably don't want to ever reach high static float GetRandomNumberInRange(float low, float high) { return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); } -- cgit v1.2.3