9
3

DetourMath.h 763 B

123456789101112131415161718192021222324
  1. /**
  2. @defgroup detour Detour
  3. Members in this module are wrappers around the standard math library
  4. */
  5. #ifndef DETOURMATH_H
  6. #define DETOURMATH_H
  7. #include <math.h>
  8. // This include is required because libstdc++ has problems with isfinite
  9. // if cmath is included before math.h.
  10. #include <cmath>
  11. inline float dtMathFabsf(float x) { return fabsf(x); }
  12. inline float dtMathSqrtf(float x) { return sqrtf(x); }
  13. inline float dtMathFloorf(float x) { return floorf(x); }
  14. inline float dtMathCeilf(float x) { return ceilf(x); }
  15. inline float dtMathCosf(float x) { return cosf(x); }
  16. inline float dtMathSinf(float x) { return sinf(x); }
  17. inline float dtMathAtan2f(float y, float x) { return atan2f(y, x); }
  18. inline bool dtMathIsfinite(float x) { return std::isfinite(x); }
  19. #endif