diff options
author | JJ Linden <jj@lindenlab.com> | 2013-10-10 16:44:22 -0700 |
---|---|---|
committer | JJ Linden <jj@lindenlab.com> | 2013-10-10 16:44:22 -0700 |
commit | dc431ea6d2e4e13ab505b8118d6f9220630efe96 (patch) | |
tree | 8c37de1ca61cf29e3d1863ce08d34acff666e9ab /indra/llmath/llvector4a.inl | |
parent | 3aea5a5a6ab0e6d96fe581a9bab9896956129ba3 (diff) | |
parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) |
merged in recent changes
Diffstat (limited to 'indra/llmath/llvector4a.inl')
-rwxr-xr-x | indra/llmath/llvector4a.inl | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/llmath/llvector4a.inl b/indra/llmath/llvector4a.inl index 558fe09323..69d3d01efe 100755 --- a/indra/llmath/llvector4a.inl +++ b/indra/llmath/llvector4a.inl @@ -480,16 +480,13 @@ inline void LLVector4a::setMax(const LLVector4a& lhs, const LLVector4a& rhs) mQ = _mm_max_ps(lhs.mQ, rhs.mQ); } -// Set this to (c * lhs) + rhs * ( 1 - c) +// Set this to lhs + (rhs-lhs)*c inline void LLVector4a::setLerp(const LLVector4a& lhs, const LLVector4a& rhs, F32 c) { - LLVector4a a = lhs; - a.mul(c); - - LLVector4a b = rhs; - b.mul(1.f-c); - - setAdd(a, b); + LLVector4a t; + t.setSub(rhs,lhs); + t.mul(c); + setAdd(lhs, t); } inline LLBool32 LLVector4a::isFinite3() const |