diff options
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r-- | OpenAL32/Include/alu.h | 8 |
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; |