diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-03-20 16:59:41 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-03-20 16:59:41 -0500 |
| commit | 8424ceb20f7baa6d5cf980d2b9ae92121d1dcb20 (patch) | |
| tree | eb691b2e04d91d0f994f1fc04acd066e4d474384 /indra/llmath/v2math.cpp | |
| parent | 433996c2014d2f5ff5037d1fbb8bb5edbe818e1f (diff) | |
| parent | 06e3d288e40e46204d84aed9c548a6ca529e78d8 (diff) | |
merge
Diffstat (limited to 'indra/llmath/v2math.cpp')
| -rw-r--r-- | indra/llmath/v2math.cpp | 15 |
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(); +} + |
