From bc3d0217af85e61f26b9dd68d60093b766e9d71d Mon Sep 17 00:00:00 2001 From: alondria Date: Sun, 3 Feb 2008 16:42:43 +0000 Subject: Added llRot2Fwd, llRot2Left, and llRot2Up as well as explicit vector->string casting. (Thanks to dalien on informing me how easy the math was for these). --- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_Types.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index bbdd4ee..fc0e282 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -80,6 +80,11 @@ namespace OpenSim.Region.ScriptEngine.Common return "<" + x.ToString() + ", " + y.ToString() + ", " + z.ToString() + ">"; } + public static explicit operator string(Vector3 vec) + { + return "<" + vec.x.ToString() + ", " + vec.y.ToString() + ", " + vec.z.ToString() + ">"; + } + public static bool operator ==(Vector3 lhs, Vector3 rhs) { return (lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z); -- cgit v1.1