mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-16 19:48:59 +00:00
16 lines
414 B
C
16 lines
414 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()/65536.0f); }
|
||
|
};
|