summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-11-12 14:06:38 -0500
committerMonty Brandenberg <monty@lindenlab.com>2013-11-12 14:06:38 -0500
commitd191585a3eec778e36e5f0c4b620c3d525c86c42 (patch)
tree2612c0d1947e00d9ceba82b054a7a90113ffa752 /indra/llmath
parentac1d3a22f2034a5e3aba757bde72825643fa799c (diff)
parentebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff)
Merge. Refresh from viewer-release after 3.6.10 release
Diffstat (limited to 'indra/llmath')
-rwxr-xr-xindra/llmath/llvolume.cpp6
-rwxr-xr-xindra/llmath/v4color.h2
2 files changed, 5 insertions, 3 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));
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index b047f86e6e..8c8c315808 100755
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -50,7 +50,7 @@ class LLColor4
LLColor4(F32 r, F32 g, F32 b); // Initializes LLColor4 to (r, g, b, 1)
LLColor4(F32 r, F32 g, F32 b, F32 a); // Initializes LLColor4 to (r. g, b, a)
LLColor4(U32 clr); // Initializes LLColor4 to (r=clr>>24, etc))
- LLColor4(const F32 *vec); // Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1)
+ LLColor4(const F32 *vec); // Initializes LLColor4 to (vec[0]. vec[1], vec[2], vec[3])
LLColor4(const LLColor3 &vec, F32 a = 1.f); // Initializes LLColor4 to (vec, a)
explicit LLColor4(const LLSD& sd);
explicit LLColor4(const LLColor4U& color4u); // "explicit" to avoid automatic conversion