summaryrefslogtreecommitdiff
path: root/indra/llmath/v4math.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/v4math.cpp')
-rw-r--r--indra/llmath/v4math.cpp40
1 files changed, 9 insertions, 31 deletions
diff --git a/indra/llmath/v4math.cpp b/indra/llmath/v4math.cpp
index 2782cf2966..8388fbdbc4 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;
@@ -82,14 +60,14 @@ 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()
+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;
}