diff options
author | Mike Mazur | 2008-07-28 02:36:22 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-28 02:36:22 +0000 |
commit | a61e1ea7dcf174c640d868ec2ebf57a9d25e90ef (patch) | |
tree | d5b2565a9737f270989baa9343f70d874ba3e9c9 /OpenSim/Region/ScriptEngine | |
parent | -copy LSL_Types tests from Common/ to Shared/ (diff) | |
download | opensim-SC_OLD-a61e1ea7dcf174c640d868ec2ebf57a9d25e90ef.zip opensim-SC_OLD-a61e1ea7dcf174c640d868ec2ebf57a9d25e90ef.tar.gz opensim-SC_OLD-a61e1ea7dcf174c640d868ec2ebf57a9d25e90ef.tar.bz2 opensim-SC_OLD-a61e1ea7dcf174c640d868ec2ebf57a9d25e90ef.tar.xz |
Adding explicit cast from LSLFloat to LSLInteger. Work on issue 1822.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 5 |
1 files changed, 5 insertions, 0 deletions
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 | |||
1291 | return new LSLInteger(d); | 1291 | return new LSLInteger(d); |
1292 | } | 1292 | } |
1293 | 1293 | ||
1294 | static public explicit operator LSLInteger(LSLFloat f) | ||
1295 | { | ||
1296 | return new LSLInteger(f.value); | ||
1297 | } | ||
1298 | |||
1294 | static public bool operator ==(LSLInteger i1, LSLInteger i2) | 1299 | static public bool operator ==(LSLInteger i1, LSLInteger i2) |
1295 | { | 1300 | { |
1296 | bool ret = i1.value == i2.value; | 1301 | bool ret = i1.value == i2.value; |