summaryrefslogtreecommitdiff
path: root/indra/llmath/v3math.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/v3math.h')
-rw-r--r--indra/llmath/v3math.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index 7f96800e21..73738cffd2 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -67,14 +67,12 @@ class LLVector3
explicit LLVector3(const LLVector2 &vec); // Initializes LLVector3 to (vec[0]. vec[1], 0)
explicit LLVector3(const LLVector3d &vec); // Initializes LLVector3 to (vec[0]. vec[1], vec[2])
explicit LLVector3(const LLVector4 &vec); // Initializes LLVector4 to (vec[0]. vec[1], vec[2])
- LLVector3(const LLSD& sd);
+ explicit LLVector3(const LLSD& sd);
LLSD getValue() const;
void setValue(const LLSD& sd);
- const LLVector3& operator=(const LLSD& sd);
-
inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite
BOOL clamp(F32 min, F32 max); // Clamps all values to (min,max), returns TRUE if data changed
BOOL clampLength( F32 length_limit ); // Scales vector to limit length to a value
@@ -411,8 +409,8 @@ inline bool operator<(const LLVector3 &a, const LLVector3 &b)
return (a.mV[0] < b.mV[0]
|| (a.mV[0] == b.mV[0]
&& (a.mV[1] < b.mV[1]
- || (a.mV[1] == b.mV[1])
- && a.mV[2] < b.mV[2])));
+ || ((a.mV[1] == b.mV[1])
+ && a.mV[2] < b.mV[2]))));
}
inline const LLVector3& operator+=(LLVector3 &a, const LLVector3 &b)
@@ -558,4 +556,10 @@ inline BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon)
return FALSE;
}
+inline std::ostream& operator<<(std::ostream& s, const LLVector3 &a)
+{
+ s << "{ " << a.mV[VX] << ", " << a.mV[VY] << ", " << a.mV[VZ] << " }";
+ return s;
+}
+
#endif