diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
commit | cde1174345224d33d6b45b1e3243fa39043223e5 (patch) | |
tree | 6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/llmath/v2math.h | |
parent | 6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff) | |
parent | 35efadf78315f9b351415930dca4fae251ef4dd0 (diff) |
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/llmath/v2math.h')
-rw-r--r-- | indra/llmath/v2math.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h index 5c756a7f84..a61c946304 100644 --- a/indra/llmath/v2math.h +++ b/indra/llmath/v2math.h @@ -78,12 +78,12 @@ class LLVector2 F32 magVecSquared() const; // deprecated F32 normVec(); // deprecated - BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed + bool abs(); // sets all values to absolute value of original value (first octant), returns true if changed const LLVector2& scaleVec(const LLVector2& vec); // scales per component by vec - BOOL isNull(); // Returns TRUE if vector has a _very_small_ length - BOOL isExactlyZero() const { return !mV[VX] && !mV[VY]; } + bool isNull(); // Returns true if vector has a _very_small_ length + bool isExactlyZero() const { return !mV[VX] && !mV[VY]; } F32 operator[](int idx) const { return mV[idx]; } F32 &operator[](int idx) { return mV[idx]; } @@ -114,7 +114,7 @@ class LLVector2 // Non-member functions F32 angle_between(const LLVector2 &a, const LLVector2 &b); // Returns angle (radians) between a and b -BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel +bool are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns true if a and b are very close to parallel F32 dist_vec(const LLVector2 &a, const LLVector2 &b); // Returns distance between a and b F32 dist_vec_squared(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b F32 dist_vec_squared2D(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b ignoring Z component @@ -232,7 +232,7 @@ inline F32 LLVector2::lengthSquared(void) const return mV[0]*mV[0] + mV[1]*mV[1]; } -inline F32 LLVector2::normalize(void) +inline F32 LLVector2::normalize(void) { F32 mag = (F32) sqrt(mV[0]*mV[0] + mV[1]*mV[1]); F32 oomag; @@ -299,13 +299,13 @@ inline const LLVector2& LLVector2::scaleVec(const LLVector2& vec) return *this; } -inline BOOL LLVector2::isNull() +inline bool LLVector2::isNull() { if ( F_APPROXIMATELY_ZERO > mV[VX]*mV[VX] + mV[VY]*mV[VY] ) { - return TRUE; + return true; } - return FALSE; + return false; } |