summaryrefslogtreecommitdiff
path: root/indra/llmath/v2math.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/v2math.h')
-rw-r--r--indra/llmath/v2math.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h
index 8d5db96f5e..2335a2e327 100644
--- a/indra/llmath/v2math.h
+++ b/indra/llmath/v2math.h
@@ -49,6 +49,7 @@ class LLVector2
LLVector2(F32 x, F32 y); // Initializes LLVector2 to (x. y)
LLVector2(const F32 *vec); // Initializes LLVector2 to (vec[0]. vec[1])
explicit LLVector2(const LLVector3 &vec); // Initializes LLVector2 to (vec[0]. vec[1])
+ explicit LLVector2(const LLSD &sd);
// Clears LLVector2 to (0, 0). DEPRECATED - prefer zeroVec.
void clear();
@@ -61,7 +62,7 @@ class LLVector2
void set(const F32 *vec); // Sets LLVector2 to vec
LLSD getValue() const;
- void setValue(LLSD& sd);
+ void setValue(const LLSD& sd);
void setVec(F32 x, F32 y); // deprecated
void setVec(const LLVector2 &vec); // deprecated
@@ -145,6 +146,10 @@ inline LLVector2::LLVector2(const LLVector3 &vec)
mV[VY] = vec.mV[VY];
}
+inline LLVector2::LLVector2(const LLSD &sd)
+{
+ setValue(sd);
+}
// Clear and Assignment Functions