From ddf126321cd05228a377e49ca23c16c4f0cfe25f Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Thu, 31 Jul 2008 09:34:13 +0000 Subject: Thanks, M. Igarashi & nlin, for a patch that implements unary minus operator for Vector3 type. Fix issue 1872. --- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 21acac2..4fff717 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -126,6 +126,11 @@ namespace OpenSim.Region.ScriptEngine.Common return (x == vector.x && x == vector.x && z == vector.z); } + public static Vector3 operator -(Vector3 vector) + { + return new Vector3(-vector.x, -vector.y, -vector.z); + } + #endregion #region Vector & Vector Math -- cgit v1.1