aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/math/defs.h2
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
32static inline double min(R a, R b) { return fmin(a, b); } 32static inline double min(R a, R b) { return fmin(a, b); }
33static inline double max(R a, R b) { return fmax(a, b); } 33static inline double max(R a, R b) { return fmax(a, b); }
34static inline double rlog2(R a) { return log2(a); }
34#else // floats 35#else // floats
35static inline float min(R a, R b) { return fminf(a, b); } 36static inline float min(R a, R b) { return fminf(a, b); }
36static inline float max(R a, R b) { return fmaxf(a, b); } 37static inline float max(R a, R b) { return fmaxf(a, b); }
38static inline float rlog2(R a) { return log2f(a); }
37#endif 39#endif
38 40
39static inline R rabs(R x) { return x >= 0.0 ? x : -x; } 41static inline R rabs(R x) { return x >= 0.0 ? x : -x; }