summaryrefslogtreecommitdiff
path: root/indra/llmath/v4math.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-06-12 17:04:34 -0700
committerGitHub <noreply@github.com>2024-06-12 17:04:34 -0700
commit100ebbab2437de7f5d124a0d7b8279a7a7b57656 (patch)
treee8b4200dae16e89698c2f3eadae05634041681a1 /indra/llmath/v4math.cpp
parentf5e2708a0fc4e08d3d0a5dc393bbd4bac09e1c55 (diff)
parentae74ca80692c8bcf157e903033fcfa1778706d64 (diff)
Merge pull request #1745 from secondlife/project/gltf_development
move project/gltf development to develop
Diffstat (limited to 'indra/llmath/v4math.cpp')
-rw-r--r--indra/llmath/v4math.cpp42
1 files changed, 10 insertions, 32 deletions
diff --git a/indra/llmath/v4math.cpp b/indra/llmath/v4math.cpp
index 8955145527..0aa6eb09c3 100644
--- a/indra/llmath/v4math.cpp
+++ b/indra/llmath/v4math.cpp
@@ -36,28 +36,6 @@
// LLVector4
// Axis-Angle rotations
-
-/*
-const LLVector4& LLVector4::rotVec(F32 angle, const LLVector4 &vec)
-{
- if ( !vec.isExactlyZero() && angle )
- {
- *this = *this * LLMatrix4(angle, vec);
- }
- return *this;
-}
-
-const LLVector4& LLVector4::rotVec(F32 angle, F32 x, F32 y, F32 z)
-{
- LLVector3 vec(x, y, z);
- if ( !vec.isExactlyZero() && angle )
- {
- *this = *this * LLMatrix4(angle, vec);
- }
- return *this;
-}
-*/
-
const LLVector4& LLVector4::rotVec(const LLMatrix4 &mat)
{
*this = *this * mat;
@@ -81,15 +59,15 @@ const LLVector4& LLVector4::scaleVec(const LLVector4& vec)
}
// Sets all values to absolute value of their original values
-// Returns TRUE if data changed
-BOOL LLVector4::abs()
+// Returns true if data changed
+bool LLVector4::abs()
{
- BOOL ret = FALSE;
+ 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[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; }
return ret;
}
@@ -117,7 +95,7 @@ F32 angle_between( const LLVector4& a, const LLVector4& b )
return angle;
}
-BOOL are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon)
+bool are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon)
{
LLVector4 an = a;
LLVector4 bn = b;
@@ -125,8 +103,8 @@ BOOL are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon)
bn.normalize();
F32 dot = an * bn;
if ( (1.0f - fabs(dot)) < epsilon)
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}