From a61e1ea7dcf174c640d868ec2ebf57a9d25e90ef Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Mon, 28 Jul 2008 02:36:22 +0000 Subject: Adding explicit cast from LSLFloat to LSLInteger. Work on issue 1822. --- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index bb1fe2f..d0871bc 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -1291,6 +1291,11 @@ namespace OpenSim.Region.ScriptEngine.Common return new LSLInteger(d); } + static public explicit operator LSLInteger(LSLFloat f) + { + return new LSLInteger(f.value); + } + static public bool operator ==(LSLInteger i1, LSLInteger i2) { bool ret = i1.value == i2.value; -- cgit v1.1