eqemu-server/zone/fastmath.h
Michael Cook (mackal) 35c4867334 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
2018-03-04 02:19:12 -05:00

19 lines
320 B
C++

#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 */