re3-wiiu/src/General.h

22 lines
570 B
C
Raw Normal View History

2019-05-29 20:02:58 +02:00
2019-05-15 16:52:37 +02:00
class CGeneral
{
public:
static float GetATanOfXY(float x, float y){
if(y >= 0.0f) return atan2(x, y);
return atan2(x, y) + 2*M_PI;
}
// not too sure about all these...
static uint16 GetRandomNumber(void)
{ return myrand() & 0xFFFF; }
// Probably don't want to ever reach high
static float GetRandomNumberInRange(float low, float high)
2019-05-29 20:05:50 +02:00
{ return low + (high - low)*(GetRandomNumber()/float(MY_RAND_MAX + 1)); }
2019-05-29 20:02:58 +02:00
static Int32 GetRandomNumberInRange(Int32 low, Int32 high)
2019-05-29 20:05:50 +02:00
{ return low + (high - low)*(GetRandomNumber()/float(MY_RAND_MAX + 1)); }
2019-05-15 16:52:37 +02:00
};