summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-06-11 12:02:54 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-06-11 12:02:54 -0700
commit01f595d8716f7b80ab0088d93434fa77cc812c16 (patch)
tree0d566aa43e1ef2a17d612994e8713a7149ce9663 /indra/llmath/llvolume.cpp
parent840c2f9237c9b5b7f5febc663a102c02aeb47b6f (diff)
Speculative fix for tangent calc asserts on Mac
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rwxr-xr-xindra/llmath/llvolume.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index f9dd843b92..1932272afb 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -7252,7 +7252,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
F32 rd = s1*t2-s2*t1;
- float r = rd*rd > 0.f ? 1.0F / rd : 1024.f; //some made up large ratio for division by zero
+ float r = ((rd*rd) > FLT_EPSILON) ? 1.0F / rd : 1024.f; //some made up large ratio for division by zero
llassert(llfinite(r));
llassert(!llisnan(r));
@@ -7276,7 +7276,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
LLVector4a n = normal[a];
const LLVector4a& t = tan1[a];
-
+
llassert(tan1[a].getLength3().getF32() >= 0.f);
llassert(tan2[a].getLength3().getF32() >= 0.f);