mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Implement cast to LSL_Types.LSLInteger from double. Fix issue 1770.
This commit is contained in:
@@ -1281,6 +1281,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
return new LSLInteger(u);
|
||||
}
|
||||
|
||||
static public implicit operator LSLInteger(double d)
|
||||
{
|
||||
return new LSLInteger(d);
|
||||
}
|
||||
|
||||
static public bool operator ==(LSLInteger i1, LSLInteger i2)
|
||||
{
|
||||
bool ret = i1.value == i2.value;
|
||||
|
||||
@@ -1309,6 +1309,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
return new LSLInteger(u);
|
||||
}
|
||||
|
||||
static public implicit operator LSLInteger(double d)
|
||||
{
|
||||
return new LSLInteger(d);
|
||||
}
|
||||
|
||||
static public bool operator ==(LSLInteger i1, LSLInteger i2)
|
||||
{
|
||||
bool ret = i1.value == i2.value;
|
||||
|
||||
Reference in New Issue
Block a user