aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authoralondria2008-03-21 21:31:18 +0000
committeralondria2008-03-21 21:31:18 +0000
commit6ac21141c6ae66d9cdbf8a00645f130496edd7ee (patch)
tree7b3b259ebb5eb02daead4280c38be357bf4241bf /OpenSim
parentWoops - forgot to call m_host.AddScriptLPS(1) in llGetObjectDetails.... (diff)
downloadopensim-SC-6ac21141c6ae66d9cdbf8a00645f130496edd7ee.zip
opensim-SC-6ac21141c6ae66d9cdbf8a00645f130496edd7ee.tar.gz
opensim-SC-6ac21141c6ae66d9cdbf8a00645f130496edd7ee.tar.bz2
opensim-SC-6ac21141c6ae66d9cdbf8a00645f130496edd7ee.tar.xz
Adds in +, -, and / operators for Rotations (and fixes Mantis 671)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index 6fb568c..292950c 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -322,6 +322,23 @@ namespace OpenSim.Region.ScriptEngine.Common
322 322
323 #endregion 323 #endregion
324 324
325 public static Quaternion operator +(Quaternion a, Quaternion b)
326 {
327 return new Quaternion(a.x + b.x, a.y + b.y, a.z + b.z, a.s + b.s);
328 }
329
330 public static Quaternion operator /(Quaternion a, Quaternion b)
331 {
332 Quaternion c = a * b;
333 c.s = c.s * -1;
334 return c;
335 }
336
337 public static Quaternion operator -(Quaternion a, Quaternion b)
338 {
339 return new Quaternion(a.x - b.x, a.y - b.y, a.z - b.z, a.s - b.s);
340 }
341
325 public static Quaternion operator *(Quaternion a, Quaternion b) 342 public static Quaternion operator *(Quaternion a, Quaternion b)
326 { 343 {
327 Quaternion c; 344 Quaternion c;