From 8a51a7ea2d5234555f00cf9a391eefceb1989efa Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 16 Aug 2011 04:21:58 -0700 Subject: Use inline minF/maxF/clampF functions instead of the __min/__max macros --- OpenAL32/Include/alu.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenAL32/Include') 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; -- cgit v1.2.3