diff options
author | aap <aap@papnet.eu> | 2019-05-15 16:52:37 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-05-15 16:52:37 +0200 |
commit | 600bf0351476a5a21aabb5429132ddf7f52ac0b9 (patch) | |
tree | d8e48b3a581679e33830fb7c98ed69e1e242e2c2 /src/General.h |
first commit
Diffstat (limited to 'src/General.h')
-rw-r--r-- | src/General.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/General.h b/src/General.h new file mode 100644 index 00000000..7aacee39 --- /dev/null +++ b/src/General.h @@ -0,0 +1,15 @@ +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); } +}; |