summaryrefslogtreecommitdiff
path: root/indra/llmath/v2math.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-19 13:51:35 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-19 13:51:35 +0000
commit49b37a4dc362679e94fe04ff3cd7094f0e0e9f68 (patch)
tree9832afd6820bc0122fb8eef0552bbfab58736492 /indra/llmath/v2math.cpp
parentc3a71b7dcbfe855058a84e22651aea3910133aa1 (diff)
parent8bafcc0491d0131a53226365f18b3ba68648a742 (diff)
merge from viewer2, conflicts resolved...
Diffstat (limited to 'indra/llmath/v2math.cpp')
-rw-r--r--indra/llmath/v2math.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llmath/v2math.cpp b/indra/llmath/v2math.cpp
index 555e1f92bb..220336e0c2 100644
--- a/indra/llmath/v2math.cpp
+++ b/indra/llmath/v2math.cpp
@@ -115,3 +115,18 @@ LLVector2 lerp(const LLVector2 &a, const LLVector2 &b, F32 u)
a.mV[VX] + (b.mV[VX] - a.mV[VX]) * u,
a.mV[VY] + (b.mV[VY] - a.mV[VY]) * u );
}
+
+LLSD LLVector2::getValue() const
+{
+ LLSD ret;
+ ret[0] = mV[0];
+ ret[1] = mV[1];
+ return ret;
+}
+
+void LLVector2::setValue(LLSD& sd)
+{
+ mV[0] = (F32) sd[0].asReal();
+ mV[1] = (F32) sd[1].asReal();
+}
+