mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-24 18:16:52 +01:00
22 lines
570 B
C++
22 lines
570 B
C++
|
|
|
|
|
|
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)
|
|
{ return low + (high - low)*(GetRandomNumber()/float(MY_RAND_MAX + 1)); }
|
|
|
|
static Int32 GetRandomNumberInRange(Int32 low, Int32 high)
|
|
{ return low + (high - low)*(GetRandomNumber()/float(MY_RAND_MAX + 1)); }
|
|
};
|