Adding explicit cast from LSLFloat to LSLInteger. Work on issue 1822.

This commit is contained in:
Mike Mazur
2008-07-28 02:36:22 +00:00
parent 82fa53a486
commit a61e1ea7dc
2 changed files with 76 additions and 0 deletions

View File

@@ -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;