Recast Navigation
Navigation-mesh Toolset for Games
Loading...
Searching...
No Matches
DetourMath.h
Go to the documentation of this file.
1
7#ifndef DETOURMATH_H
8#define DETOURMATH_H
9
10#include <math.h>
11
12inline float dtMathFabsf(float x) { return fabsf(x); }
13inline float dtMathSqrtf(float x) { return sqrtf(x); }
14inline float dtMathFloorf(float x) { return floorf(x); }
15inline float dtMathCeilf(float x) { return ceilf(x); }
16inline float dtMathCosf(float x) { return cosf(x); }
17inline float dtMathSinf(float x) { return sinf(x); }
18inline float dtMathAtan2f(float y, float x) { return atan2f(y, x); }
19inline bool dtMathIsfinite(float x)
20{
21#ifndef RC_FAST_MATH
22 return isfinite(x);
23#else
24 // Infinity and NaN are disabled when compiling with -ffast-math
25 (void)x;
26 return true;
27#endif
28}
29
30#endif
float dtMathAtan2f(float y, float x)
Definition DetourMath.h:18
float dtMathFabsf(float x)
Definition DetourMath.h:12
float dtMathFloorf(float x)
Definition DetourMath.h:14
float dtMathSinf(float x)
Definition DetourMath.h:17
float dtMathSqrtf(float x)
Definition DetourMath.h:13
float dtMathCeilf(float x)
Definition DetourMath.h:15
bool dtMathIsfinite(float x)
Definition DetourMath.h:19
float dtMathCosf(float x)
Definition DetourMath.h:16