diff options
author | Merov Linden <merov@lindenlab.com> | 2013-10-14 17:25:24 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-10-14 17:25:24 -0700 |
commit | f6c7b906e1f1d1bcc56a1e71b1867a58c5b2381a (patch) | |
tree | ec9226508d7a3e1555b774fde915a8b299b35cd7 /indra/llmath | |
parent | c2f5365f986aab49d5c7cfa2834a68f5b35c09c2 (diff) | |
parent | 04b84ce07dd5bc8364f948ef0004e3dc5328f1b4 (diff) |
Pull merge with lindenlab/viewer-bear
Diffstat (limited to 'indra/llmath')
-rwxr-xr-x | indra/llmath/llvolume.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 2b865b4a8e..f74c934b21 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -166,7 +166,8 @@ void calc_tangent_from_triangle( F32 rd = s1*t2-s2*t1; - float r = ((rd*rd) > FLT_EPSILON) ? 1.0F / rd : 1024.f; //some made up large ratio for division by zero + float r = ((rd*rd) > FLT_EPSILON) ? (1.0f / rd) + : ((rd > 0.0f) ? 1024.f : -1024.f); //some made up large ratio for division by zero llassert(llfinite(r)); llassert(!llisnan(r)); @@ -6789,7 +6790,8 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe F32 rd = s1*t2-s2*t1; - float r = ((rd*rd) > FLT_EPSILON) ? 1.0F / rd : 1024.f; //some made up large ratio for division by zero + float r = ((rd*rd) > FLT_EPSILON) ? (1.0f / rd) + : ((rd > 0.0f) ? 1024.f : -1024.f); //some made up large ratio for division by zero llassert(llfinite(r)); llassert(!llisnan(r)); |