Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-10 12:32:05 +0000
committerStijn Buys <ingar@osirion.org>2008-05-10 12:32:05 +0000
commit58fa27476e4be965d78782a971439e430032d6b0 (patch)
tree28e2cb520331662122bb6cfeff32a6613f5cfd5d /src/math
parent6d9b90ccce41c183e11eab0e70e7204ba8580dff (diff)
more interpolation issues
Diffstat (limited to 'src/math')
-rw-r--r--src/math/functions.h5
1 files changed, 4 insertions, 1 deletions
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