aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-16 04:21:58 -0700
committerChris Robinson <[email protected]>2011-08-16 04:21:58 -0700
commit8a51a7ea2d5234555f00cf9a391eefceb1989efa (patch)
tree394772e084fd2a21776a1872bdc267bd9f6de53c /OpenAL32/Include/alu.h
parentb3cb511c06e669a2024025fc3b3206674c70d737 (diff)
Use inline minF/maxF/clampF functions instead of the __min/__max macros
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 609978f5..65d8d3a7 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -127,6 +127,14 @@ enum DistanceModel {
#endif
+static __inline ALfloat minF(ALfloat a, ALfloat b)
+{ return ((a > b) ? b : a); }
+static __inline ALfloat maxF(ALfloat a, ALfloat b)
+{ return ((a > b) ? a : b); }
+static __inline ALfloat clampF(ALfloat val, ALfloat mn, ALfloat mx)
+{ return minF(mx, maxF(mn, val)); }
+
+
static __inline ALdouble lerp(ALdouble val1, ALdouble val2, ALdouble mu)
{
return val1 + (val2-val1)*mu;