summaryrefslogtreecommitdiff
path: root/indra/llmath/llquaternion.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-13 08:45:37 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-13 08:45:37 +0300
commit1da6053cdef9828bcb4f75e21cd655edc15e3c4e (patch)
tree4a65471a738bb6fa51fb7e99e5e0c6ba77701f1b /indra/llmath/llquaternion.cpp
parenteceab67f0ea4edac07d0faf87d28a725a9d69084 (diff)
parentf32a6d40aa47c887d0c98a937a37dfa4d6893768 (diff)
Merge commit 'f32a6d40aa' into marchcat/c-develop
# Conflicts: # indra/llmath/v2math.cpp # indra/llmath/v2math.h # indra/llmath/v3math.h # indra/llmath/v4math.h # indra/newview/llagent.cpp # indra/newview/llagentcamera.h # indra/newview/llfloaternamedesc.cpp # indra/newview/llfloaternamedesc.h # indra/newview/llinventorybridge.cpp # indra/newview/llmaterialeditor.cpp # indra/newview/llreflectionmap.cpp # indra/newview/llviewerassetupload.cpp # indra/newview/llviewercamera.cpp # indra/newview/llviewercamera.h # indra/newview/llviewermenufile.cpp # indra/newview/llviewerobject.h # indra/newview/llvovolume.h
Diffstat (limited to 'indra/llmath/llquaternion.cpp')
-rw-r--r--indra/llmath/llquaternion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llmath/llquaternion.cpp b/indra/llmath/llquaternion.cpp
index 1ab3a73d79..3a6748bdb3 100644
--- a/indra/llmath/llquaternion.cpp
+++ b/indra/llmath/llquaternion.cpp
@@ -57,7 +57,7 @@ LLQuaternion::LLQuaternion(const LLMatrix3 &mat)
LLQuaternion::LLQuaternion(F32 angle, const LLVector4 &vec)
{
- F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]);
+ F32 mag = vec.length();
if (mag > FP_MAG_THRESHOLD)
{
angle *= 0.5;
@@ -76,7 +76,7 @@ LLQuaternion::LLQuaternion(F32 angle, const LLVector4 &vec)
LLQuaternion::LLQuaternion(F32 angle, const LLVector3 &vec)
{
- F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]);
+ F32 mag = vec.length();
if (mag > FP_MAG_THRESHOLD)
{
angle *= 0.5;