aboutsummaryrefslogtreecommitdiffstats
path: root/common/vecmat.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-22 16:01:14 -0800
committerChris Robinson <[email protected]>2018-12-22 16:01:14 -0800
commit334b3a905a1a387d5fb5f74483a7520bb5d5449a (patch)
tree8f6aa333bb1b4eecbf9bcfe3f3f972c895345480 /common/vecmat.h
parentd4d98e2fe9820f390515baf581dea7dc9bec1431 (diff)
Clean up some math stuff
Diffstat (limited to 'common/vecmat.h')
-rw-r--r--common/vecmat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/vecmat.h b/common/vecmat.h
index 1ecc4b7c..ab407b15 100644
--- a/common/vecmat.h
+++ b/common/vecmat.h
@@ -3,6 +3,7 @@
#include <cmath>
#include <array>
+#include <limits>
#include <algorithm>
#include "math_defs.h"
@@ -41,7 +42,7 @@ public:
float normalize()
{
const float length{std::sqrt(mVals[0]*mVals[0] + mVals[1]*mVals[1] + mVals[2]*mVals[2])};
- if(length > FLT_EPSILON)
+ if(length > std::numeric_limits<float>::epsilon())
{
float inv_length = 1.0f/length;
mVals[0] *= inv_length;