summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-01-20 15:11:48 -0600
committerDave Parks <davep@lindenlab.com>2010-01-20 15:11:48 -0600
commit9c1055ea0e4ef28f1264cbfe690badd8cdb41d26 (patch)
tree768d93f4533ba1bf7f4487a02b650297cc12d815 /indra
parent1a8008ea150d1eb9a8f4036988ef971fb1901cb3 (diff)
parentd3e84ea77baa7d60fe225f7b440297e9a49318a6 (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llmath/m4math.cpp17
-rw-r--r--indra/llmath/m4math.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/indra/llmath/m4math.cpp b/indra/llmath/m4math.cpp
index 7c7f60154d..3700142982 100644
--- a/indra/llmath/m4math.cpp
+++ b/indra/llmath/m4math.cpp
@@ -785,6 +785,23 @@ bool operator!=(const LLMatrix4 &a, const LLMatrix4 &b)
return FALSE;
}
+bool operator<(const LLMatrix4& a, const LLMatrix4 &b)
+{
+ U32 i, j;
+ for (i = 0; i < NUM_VALUES_IN_MAT4; i++)
+ {
+ for (j = 0; j < NUM_VALUES_IN_MAT4; j++)
+ {
+ if (a.mMatrix[i][j] != b.mMatrix[i][j])
+ {
+ return a.mMatrix[i][j] < b.mMatrix[i][j];
+ }
+ }
+ }
+
+ return false;
+}
+
const LLMatrix4& operator*=(LLMatrix4 &a, F32 k)
{
U32 i, j;
diff --git a/indra/llmath/m4math.h b/indra/llmath/m4math.h
index de981b7646..6007b96bd9 100644
--- a/indra/llmath/m4math.h
+++ b/indra/llmath/m4math.h
@@ -237,6 +237,7 @@ public:
friend bool operator==(const LLMatrix4 &a, const LLMatrix4 &b); // Return a == b
friend bool operator!=(const LLMatrix4 &a, const LLMatrix4 &b); // Return a != b
+ friend bool operator<(const LLMatrix4 &a, const LLMatrix4& b); // Return a < b
friend const LLMatrix4& operator+=(LLMatrix4 &a, const LLMatrix4 &b); // Return a + b
friend const LLMatrix4& operator-=(LLMatrix4 &a, const LLMatrix4 &b); // Return a - b