diff options
| author | dolphin <dolphin@lindenlab.com> | 2013-10-22 13:40:52 -0700 |
|---|---|---|
| committer | dolphin <dolphin@lindenlab.com> | 2013-10-22 13:40:52 -0700 |
| commit | 93b1111507f5e5c812b6a9e8e47bdf7db67931a0 (patch) | |
| tree | 214b852c8451409d5d355437ddad48199bef976a /indra/llmath/llvolume.cpp | |
| parent | 03cc47698489929b66fbceb139e4c95d13392b9d (diff) | |
| parent | 0d0a8d841cab3fbb569a7382b78b0b4fb485eefb (diff) | |
Merge with viewer-bear
Diffstat (limited to 'indra/llmath/llvolume.cpp')
| -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)); |
