diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-06-20 17:18:43 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-06-20 17:18:43 -0400 |
commit | 7201d55396be92b18074ac926698688f9067f222 (patch) | |
tree | 1cf99a5c1c25ce3749ab12fd96485b60ffa3400e /indra/llmath | |
parent | 27fb647fd1f1ad3280a0c848e2fcb3963a9e40ca (diff) |
BUILDFIX: linux build broken - abs() used instead of fabs()
linux caught the fact that we're using an integer absolute value function
when we should be using a floating-point version.
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llvolume.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 7c7c4306da..d401ce7de7 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -32,6 +32,7 @@ #if !LL_WINDOWS #include <stdint.h> #endif +#include <cmath> #include "llerror.h" #include "llmemtype.h" @@ -2383,8 +2384,8 @@ bool LLVolumeFace::VertexData::compareNormal(const LLVolumeFace::VertexData& rhs const F32 epsilon = 0.00001f; if (rhs.mData[POSITION].equals3(mData[POSITION], epsilon) && - abs(rhs.mTexCoord[0]-mTexCoord[0]) < epsilon && - abs(rhs.mTexCoord[1]-mTexCoord[1]) < epsilon) + fabs(rhs.mTexCoord[0]-mTexCoord[0]) < epsilon && + fabs(rhs.mTexCoord[1]-mTexCoord[1]) < epsilon) { if (angle_cutoff > 1.f) { |