From 19ad7db5e1ebcce8fc13995270b2ebe94f8a9a52 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Fri, 25 Jul 2008 07:50:31 +0000 Subject: Add casts from integer to float. Fix issue 1822. --- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 0b28af0..7ac7a65 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -1454,6 +1454,11 @@ namespace OpenSim.Region.ScriptEngine.Common return new LSLFloat(i); } + static public implicit operator LSLFloat(LSLInteger i) + { + return new LSLFloat(i.value); + } + static public implicit operator LSLFloat(string s) { return new LSLFloat(double.Parse(s)); -- cgit v1.1