From 58fa27476e4be965d78782a971439e430032d6b0 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 10 May 2008 12:32:05 +0000 Subject: more interpolation issues --- src/math/functions.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/math') diff --git a/src/math/functions.h b/src/math/functions.h index 16de778..d84fe05 100644 --- a/src/math/functions.h +++ b/src/math/functions.h @@ -58,7 +58,10 @@ inline void clamp(float &value, float min=0.0f, float max=1.0f) /// return the absolute value of a float inline float absf(float f) { - if (f >0) return f; else return -f; + if (f < 0) + return -f; + else + return f; } } // namespace math -- cgit v1.2.3