Skip to content

Commit 74a71e3

Browse files
authored
Restore llmath fixes that got lost during merge (#3948)
1 parent f5be549 commit 74a71e3

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

indra/llmath/v2math.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,19 +243,19 @@ inline bool LLVector2::isFinite() const
243243
}
244244

245245
// deprecated
246-
inline F32 LLVector2::magVec(void) const
246+
inline F32 LLVector2::magVec() const
247247
{
248248
return length();
249249
}
250250

251251
// deprecated
252-
inline F32 LLVector2::magVecSquared(void) const
252+
inline F32 LLVector2::magVecSquared() const
253253
{
254254
return lengthSquared();
255255
}
256256

257257
// deprecated
258-
inline F32 LLVector2::normVec(void)
258+
inline F32 LLVector2::normVec()
259259
{
260260
return normalize();
261261
}

indra/llmath/v3math.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ inline void LLVector3::set(const LLVector3& vec)
264264

265265
inline void LLVector3::set(const F32* vec)
266266
{
267-
set(vec[0], vec[1], vec[2]);
267+
set(vec[VX], vec[VY], vec[VZ]);
268268
}
269269

270270
inline void LLVector3::set(const glm::vec4& vec)
@@ -343,7 +343,7 @@ inline F32 LLVector3::magVecSquared() const
343343
return lengthSquared();
344344
}
345345

346-
inline bool LLVector3::inRange( F32 min, F32 max ) const
346+
inline bool LLVector3::inRange(F32 min, F32 max) const
347347
{
348348
return mV[VX] >= min && mV[VX] <= max &&
349349
mV[VY] >= min && mV[VY] <= max &&
@@ -369,7 +369,7 @@ inline F32 operator*(const LLVector3& a, const LLVector3& b)
369369

370370
inline LLVector3 operator%(const LLVector3& a, const LLVector3& b)
371371
{
372-
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] );
372+
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]);
373373
}
374374

375375
inline LLVector3 operator/(const LLVector3& a, F32 k)
@@ -429,7 +429,7 @@ inline const LLVector3& operator-=(LLVector3& a, const LLVector3& b)
429429

430430
inline const LLVector3& operator%=(LLVector3& a, const LLVector3& b)
431431
{
432-
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]);
432+
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]);
433433
a = ret;
434434
return a;
435435
}
@@ -477,7 +477,7 @@ inline F32 dist_vec(const LLVector3& a, const LLVector3& b)
477477
F32 x = a.mV[VX] - b.mV[VX];
478478
F32 y = a.mV[VY] - b.mV[VY];
479479
F32 z = a.mV[VZ] - b.mV[VZ];
480-
return sqrt( x*x + y*y + z*z );
480+
return sqrt(x*x + y*y + z*z);
481481
}
482482

483483
inline F32 dist_vec_squared(const LLVector3& a, const LLVector3& b)

indra/llmath/v4math.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ class LLVector4
118118
bool isExactlyClear() const { return (mV[VW] == 1.0f) && !mV[VX] && !mV[VY] && !mV[VZ]; }
119119
bool isExactlyZero() const { return !mV[VW] && !mV[VX] && !mV[VY] && !mV[VZ]; }
120120

121-
const LLVector4& rotVec(F32 angle, const LLVector4 &vec); // Rotates about vec by angle radians
122-
const LLVector4& rotVec(F32 angle, F32 x, F32 y, F32 z); // Rotates about x,y,z by angle radians
123121
const LLVector4& rotVec(const LLMatrix4 &mat); // Rotates by MAT4 mat
124122
const LLVector4& rotVec(const LLQuaternion &q); // Rotates by QUAT q
125123

0 commit comments

Comments
 (0)