From 18383a5fc596bf9546f14d7393ee66c57720b116 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 12 Oct 2008 11:14:22 +0000 Subject: libmath API cleanup --- src/math/functions.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/math/functions.h') diff --git a/src/math/functions.h b/src/math/functions.h index be6919d..ed013ab 100644 --- a/src/math/functions.h +++ b/src/math/functions.h @@ -51,18 +51,18 @@ float degrees360f(float angle); /// clamp a float to a specified range inline void clamp(float &value, const float min=0.0f, const float max=1.0f) { - if (value < min) - value = min; - else if (value > max) + if (value < min) + value = min; + else if (value > max) value = max; } /// return the absolute value of a float inline float absf(float f) { - if (f < 0) - return -f; - else + if (f < 0) + return -f; + else return f; } -- cgit v1.2.3