fast_math.h 454 B

123456789101112131415
  1. #ifndef _Fast_Math_H__
  2. #define _Fast_Math_H__
  3. // Constants
  4. #define ONE_BY_SQRT3 (0.57735026919f) // 1/sqrt(3)
  5. #define TWO_BY_SQRT3 (2.0f * 0.57735026919f)
  6. #define SQRT3_BY_2 (0.86602540378f)
  7. #define SQRT3 (1.73205080757f)
  8. #define M_PI (3.14159265f)
  9. void fast_sincos(float angle, float *sin, float *cos);
  10. void fast_norm_angle(float *angle);
  11. void normal_sincosf(float angle, float *sin, float *cos);
  12. #endif /* _Fast_Math_H__ */