diff options
-rw-r--r-- | include/math/defs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/math/defs.h b/include/math/defs.h index acfb037..e3c3b55 100644 --- a/include/math/defs.h +++ b/include/math/defs.h | |||
@@ -31,9 +31,11 @@ typedef float R; | |||
31 | #ifdef MATH_USE_DOUBLE | 31 | #ifdef MATH_USE_DOUBLE |
32 | static inline double min(R a, R b) { return fmin(a, b); } | 32 | static inline double min(R a, R b) { return fmin(a, b); } |
33 | static inline double max(R a, R b) { return fmax(a, b); } | 33 | static inline double max(R a, R b) { return fmax(a, b); } |
34 | static inline double rlog2(R a) { return log2(a); } | ||
34 | #else // floats | 35 | #else // floats |
35 | static inline float min(R a, R b) { return fminf(a, b); } | 36 | static inline float min(R a, R b) { return fminf(a, b); } |
36 | static inline float max(R a, R b) { return fmaxf(a, b); } | 37 | static inline float max(R a, R b) { return fmaxf(a, b); } |
38 | static inline float rlog2(R a) { return log2f(a); } | ||
37 | #endif | 39 | #endif |
38 | 40 | ||
39 | static inline R rabs(R x) { return x >= 0.0 ? x : -x; } | 41 | static inline R rabs(R x) { return x >= 0.0 ? x : -x; } |