summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2017-10-05 15:40:48 -0700
committerRider Linden <rider@lindenlab.com>2017-10-05 15:40:48 -0700
commite4b035d0cd3eaa76fd82643c17e3631c67387a54 (patch)
tree9147a9993aa7e5b33808fd31fca3950d0f2c950f /indra/llmath
parente97c52bdd3cfdf12c3eb2e423b193979de816f34 (diff)
Skys settings object active.
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/v4color.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 8f353ead5a..614cdc9f3e 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -114,9 +114,11 @@ class LLColor4
friend LLColor4 operator-(const LLColor4 &a, const LLColor4 &b); // Return vector a minus b
friend LLColor4 operator*(const LLColor4 &a, const LLColor4 &b); // Return component wise a * b
friend LLColor4 operator*(const LLColor4 &a, F32 k); // Return rgb times scaler k (no alpha change)
+ friend LLColor4 operator/(const LLColor4 &a, F32 k); // Return rgb divided by scalar k (no alpha change)
friend LLColor4 operator*(F32 k, const LLColor4 &a); // Return rgb times scaler k (no alpha change)
friend LLColor4 operator%(const LLColor4 &a, F32 k); // Return alpha times scaler k (no rgb change)
friend LLColor4 operator%(F32 k, const LLColor4 &a); // Return alpha times scaler k (no rgb change)
+
friend bool operator==(const LLColor4 &a, const LLColor4 &b); // Return a == b
friend bool operator!=(const LLColor4 &a, const LLColor4 &b); // Return a != b
@@ -477,6 +479,15 @@ inline LLColor4 operator*(const LLColor4 &a, F32 k)
a.mV[VW]);
}
+inline LLColor4 operator/(const LLColor4 &a, F32 k)
+{
+ return LLColor4(
+ a.mV[VX] / k,
+ a.mV[VY] / k,
+ a.mV[VZ] / k,
+ a.mV[VW]);
+}
+
inline LLColor4 operator*(F32 k, const LLColor4 &a)
{
// only affects rgb (not a!)