mirror of
https://github.com/EQEmu/Server.git
synced 2026-12-04 02:52:19 +00:00
Add the Fast trig functions that work with EQ headings
This should match pretty close to the clients LUTs Also fixed a bug with push
This commit is contained in:
1 parent
690d8f9155
commit
35c4867334
4 files changed
+57
-3
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#ifndef FASTMATH_H
|
||||
#define FASTMATH_H
|
||||
|
||||
class FastMath
|
||||
{
|
||||
private:
|
||||
float lut_cos[512];
|
||||
float lut_sin[512];
|
||||
|
||||
public:
|
||||
FastMath();
|
||||
|
||||
inline float FastSin(float a) { return lut_sin[static_cast<int>(a) & 0x1ff]; }
|
||||
inline float FastCos(float a) { return lut_cos[static_cast<int>(a) & 0x1ff]; }
|
||||
|
||||
};
|
||||
|
||||
#endif /* !FASTMATH_H */
|
||||
Reference in new issue
Block a user