diff options
| author | Ansariel Hiller <Ansariel@users.noreply.github.com> | 2025-04-18 22:15:47 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-18 23:15:47 +0300 | 
| commit | 74a71e30e76862d59a240a1592c4094ff82f3bf6 (patch) | |
| tree | d6b2cc41eedf45137648b2fb64d5a3bde82ad3e7 /indra | |
| parent | f5be5493706368792191eb2f85c126072a8379d8 (diff) | |
Restore llmath fixes that got lost during merge (#3948)
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llmath/v2math.h | 6 | ||||
| -rw-r--r-- | indra/llmath/v3math.h | 10 | ||||
| -rw-r--r-- | indra/llmath/v4math.h | 2 | 
3 files changed, 8 insertions, 10 deletions
| diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h index d9fb70e191..6b9d37535b 100644 --- a/indra/llmath/v2math.h +++ b/indra/llmath/v2math.h @@ -243,19 +243,19 @@ inline bool LLVector2::isFinite() const  }  // deprecated -inline F32 LLVector2::magVec(void) const +inline F32 LLVector2::magVec() const  {      return length();  }  // deprecated -inline F32 LLVector2::magVecSquared(void) const +inline F32 LLVector2::magVecSquared() const  {      return lengthSquared();  }  // deprecated -inline F32 LLVector2::normVec(void) +inline F32 LLVector2::normVec()  {      return normalize();  } diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h index baf38e4a3a..098ca5218c 100644 --- a/indra/llmath/v3math.h +++ b/indra/llmath/v3math.h @@ -264,7 +264,7 @@ inline void LLVector3::set(const LLVector3& vec)  inline void LLVector3::set(const F32* vec)  { -    set(vec[0], vec[1], vec[2]); +    set(vec[VX], vec[VY], vec[VZ]);  }  inline void LLVector3::set(const glm::vec4& vec) @@ -343,7 +343,7 @@ inline F32 LLVector3::magVecSquared() const      return lengthSquared();  } -inline bool LLVector3::inRange( F32 min, F32 max ) const +inline bool LLVector3::inRange(F32 min, F32 max) const  {      return mV[VX] >= min && mV[VX] <= max &&             mV[VY] >= min && mV[VY] <= max && @@ -369,7 +369,7 @@ inline F32  operator*(const LLVector3& a, const LLVector3& b)  inline LLVector3 operator%(const LLVector3& a, const LLVector3& b)  { -    return LLVector3( a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY] ); +    return LLVector3(a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY]);  }  inline LLVector3 operator/(const LLVector3& a, F32 k) @@ -429,7 +429,7 @@ inline const LLVector3& operator-=(LLVector3& a, const LLVector3& b)  inline const LLVector3& operator%=(LLVector3& a, const LLVector3& b)  { -    LLVector3 ret( a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY]); +    LLVector3 ret(a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY]);      a = ret;      return a;  } @@ -477,7 +477,7 @@ inline F32 dist_vec(const LLVector3& a, const LLVector3& b)      F32 x = a.mV[VX] - b.mV[VX];      F32 y = a.mV[VY] - b.mV[VY];      F32 z = a.mV[VZ] - b.mV[VZ]; -    return sqrt( x*x + y*y + z*z ); +    return sqrt(x*x + y*y + z*z);  }  inline F32 dist_vec_squared(const LLVector3& a, const LLVector3& b) diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h index d49639bd35..1cbd0d9a78 100644 --- a/indra/llmath/v4math.h +++ b/indra/llmath/v4math.h @@ -118,8 +118,6 @@ public:      bool isExactlyClear() const     { return (mV[VW] == 1.0f) && !mV[VX] && !mV[VY] && !mV[VZ]; }      bool isExactlyZero() const      { return !mV[VW] && !mV[VX] && !mV[VY] && !mV[VZ]; } -    const LLVector4& rotVec(F32 angle, const LLVector4 &vec);    // Rotates about vec by angle radians -    const LLVector4& rotVec(F32 angle, F32 x, F32 y, F32 z);     // Rotates about x,y,z by angle radians      const LLVector4& rotVec(const LLMatrix4 &mat);               // Rotates by MAT4 mat      const LLVector4& rotVec(const LLQuaternion &q);              // Rotates by QUAT q | 
