summaryrefslogtreecommitdiff
path: root/indra/llmath/v4math.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-05-28 11:36:40 -0400
committerGitHub <noreply@github.com>2025-05-28 11:36:40 -0400
commitde8275b14b30bf754cdba1da867cb2e6c2783639 (patch)
tree77022d8d0348d5e99f54966193746fb1472d7ce2 /indra/llmath/v4math.cpp
parentcf2b4dbfb280986cf859b12fd55158d7b9e0ac3d (diff)
parentfe55c7815cde70c046467edfb651659af056cefc (diff)
Merge pull request #3861 from secondlife/release/2025.04
Release/2025.04
Diffstat (limited to 'indra/llmath/v4math.cpp')
-rw-r--r--indra/llmath/v4math.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/llmath/v4math.cpp b/indra/llmath/v4math.cpp
index 0aa6eb09c3..cd475380d6 100644
--- a/indra/llmath/v4math.cpp
+++ b/indra/llmath/v4math.cpp
@@ -26,7 +26,6 @@
#include "linden_common.h"
-//#include "vmath.h"
#include "v3math.h"
#include "v4math.h"
#include "m4math.h"
@@ -36,13 +35,13 @@
// LLVector4
// Axis-Angle rotations
-const LLVector4& LLVector4::rotVec(const LLMatrix4 &mat)
+const LLVector4& LLVector4::rotVec(const LLMatrix4& mat)
{
*this = *this * mat;
return *this;
}
-const LLVector4& LLVector4::rotVec(const LLQuaternion &q)
+const LLVector4& LLVector4::rotVec(const LLQuaternion& q)
{
*this = *this * q;
return *this;
@@ -64,16 +63,16 @@ bool LLVector4::abs()
{
bool ret{ false };
- if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = true; }
- if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = true; }
- if (mV[2] < 0.f) { mV[2] = -mV[2]; ret = true; }
- if (mV[3] < 0.f) { mV[3] = -mV[3]; ret = true; }
+ if (mV[VX] < 0.f) { mV[VX] = -mV[VX]; ret = true; }
+ if (mV[VY] < 0.f) { mV[VY] = -mV[VY]; ret = true; }
+ if (mV[VZ] < 0.f) { mV[VZ] = -mV[VZ]; ret = true; }
+ if (mV[VW] < 0.f) { mV[VW] = -mV[VW]; ret = true; }
return ret;
}
-std::ostream& operator<<(std::ostream& s, const LLVector4 &a)
+std::ostream& operator<<(std::ostream& s, const LLVector4& a)
{
s << "{ " << a.mV[VX] << ", " << a.mV[VY] << ", " << a.mV[VZ] << ", " << a.mV[VW] << " }";
return s;
@@ -108,12 +107,12 @@ bool are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon)
}
-LLVector3 vec4to3(const LLVector4 &vec)
+LLVector3 vec4to3(const LLVector4& vec)
{
return LLVector3( vec.mV[VX], vec.mV[VY], vec.mV[VZ] );
}
-LLVector4 vec3to4(const LLVector3 &vec)
+LLVector4 vec3to4(const LLVector3& vec)
{
return LLVector4(vec.mV[VX], vec.mV[VY], vec.mV[VZ]);
}