summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-10-15 22:35:38 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-10-15 22:35:38 +0200
commit63a40347e361e19a4ea7aa02db96dd5cc6f3d8c3 (patch)
treebc207589aab9ae4cc742784c10941d25cd8f1d9f /indra/llmath
parent7547530ad1ff176513701fd4337ff0ce6569fac4 (diff)
Fix merge issues:
* Restore changes from 21947778baaca205615a71a97ac8f563c998fdd3 to llwindow/llwindowwin32.cpp * Restore changes from 3758618949684641fc94b5c9478d9002706213cc to newview/llinspecttexture.cpp * Fix apparent merge error in LLInventoryPanel::itemChanged * Restore changes from 1eeecfa1a8bf43a8980217ce34e3b5f4458483e0 in newview/llpaneloutfitsinventory.h * Restore changes from b9633c17e373bfe55b29228996e8473eb041466d in newview/llpaneloutfitsinventory.h & newview/llpanelwearing.cpp * Restore changes from f660f1f0fda4d2363d351fa550b4f8818b46c2c3 in newview/llviewertexture.cpp * Restore changes from b9633c17e373bfe55b29228996e8473eb041466d & 98f7d73d46fdc045759023eda6409e8c791f5cb2 in newview/lloutfitgallery.cpp and newview/lloutfitslist.cpp * Replace changes from 23729442aab7130f3368d433e8a5a9dd45ff6b98 with current implementation in develop branch * Fix more broken changes in LLViewerTexture::saveRawImage * Restore the changes in LLMath both from develop and maint-c * Fix all kind of other merge errors
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llmath.h2
-rw-r--r--indra/llmath/v2math.h4
-rw-r--r--indra/llmath/v3math.h10
-rw-r--r--indra/llmath/v4math.h4
4 files changed, 9 insertions, 11 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index fa315291a3..f5e9cdc7e4 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -75,7 +75,7 @@ constexpr F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
constexpr F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
constexpr F32 F_APPROXIMATELY_ZERO = 0.00001f;
constexpr F32 F_LN10 = 2.3025850929940456840179914546844f;
-constexpr F32 OO_LN10 = 0.43429448190325182765112891891661;
+constexpr F32 OO_LN10 = 0.43429448190325182765112891891661f;
constexpr F32 F_LN2 = 0.69314718056f;
constexpr F32 OO_LN2 = 1.4426950408889634073599246810019f;
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h
index b06739f122..6f2136139a 100644
--- a/indra/llmath/v2math.h
+++ b/indra/llmath/v2math.h
@@ -212,7 +212,7 @@ inline void LLVector2::setVec(const F32 *vec)
inline F32 LLVector2::length() const
{
- return (F32) sqrt(lengthSquared());
+ return sqrt(lengthSquared());
}
inline F32 LLVector2::lengthSquared() const
@@ -304,7 +304,7 @@ inline LLVector2 operator-(const LLVector2& a, const LLVector2& b)
inline F32 operator*(const LLVector2& a, const LLVector2& b)
{
- return (a.mV[VX]*b.mV[VX] + a.mV[VY]*b.mV[VY]);
+ return a.mV[VX]*b.mV[VX] + a.mV[VY]*b.mV[VY];
}
inline LLVector2 operator%(const LLVector2& a, const LLVector2& b)
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index bcd8f311a8..c51c3bd316 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -233,7 +233,7 @@ inline void LLVector3::set(F32 x, F32 y, F32 z)
inline void LLVector3::set(const LLVector3& vec)
{
- set(vec.mV[0], vec.mV[1], vec.mV[2]);
+ set(vec.mV[VX], vec.mV[VY], vec.mV[VZ]);
}
inline void LLVector3::set(const F32* vec)
@@ -285,10 +285,10 @@ inline F32 LLVector3::normVec()
inline F32 LLVector3::length() const
{
- return (F32) sqrt(lengthSquared());
+ return sqrt(lengthSquared());
}
-inline F32 LLVector3::lengthSquared(void) const
+inline F32 LLVector3::lengthSquared() const
{
return mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ];
}
@@ -412,9 +412,7 @@ inline const LLVector3& operator*=(LLVector3& a, const LLVector3& b)
inline const LLVector3& operator/=(LLVector3& a, F32 k)
{
- a.mV[VX] /= k;
- a.mV[VY] /= k;
- a.mV[VZ] /= k;
+ a *= 1.f / k;
return a;
}
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index b906ae24fd..4f36dc6533 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -298,7 +298,7 @@ inline void LLVector4::setVec(const F32* vec)
inline F32 LLVector4::length() const
{
- return (F32) sqrt(lengthSquared());
+ return sqrt(lengthSquared());
}
inline F32 LLVector4::lengthSquared() const
@@ -436,7 +436,7 @@ inline LLVector4 lerp(const LLVector4& a, const LLVector4& b, F32 u)
inline F32 LLVector4::normalize()
{
- F32 mag = (F32) sqrt(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]);
+ F32 mag = sqrt(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]);
if (mag > FP_MAG_THRESHOLD)
{