mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
More LSL_Types implicit/explicit cast changes. Fix issue 1854.
This commit is contained in:
@@ -1439,12 +1439,12 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
#region Operators
|
||||
|
||||
static public implicit operator int(LSLFloat f)
|
||||
static public explicit operator int(LSLFloat f)
|
||||
{
|
||||
return (int)f.value;
|
||||
}
|
||||
|
||||
static public implicit operator uint(LSLFloat f)
|
||||
static public explicit operator uint(LSLFloat f)
|
||||
{
|
||||
return (uint) Math.Abs(f.value);
|
||||
}
|
||||
@@ -1471,7 +1471,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
return new LSLFloat(i.value);
|
||||
}
|
||||
|
||||
static public implicit operator LSLFloat(string s)
|
||||
static public explicit operator LSLFloat(string s)
|
||||
{
|
||||
return new LSLFloat(double.Parse(s));
|
||||
}
|
||||
|
||||
@@ -1439,12 +1439,12 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
#region Operators
|
||||
|
||||
static public implicit operator int(LSLFloat f)
|
||||
static public explicit operator int(LSLFloat f)
|
||||
{
|
||||
return (int)f.value;
|
||||
}
|
||||
|
||||
static public implicit operator uint(LSLFloat f)
|
||||
static public explicit operator uint(LSLFloat f)
|
||||
{
|
||||
return (uint) Math.Abs(f.value);
|
||||
}
|
||||
@@ -1471,7 +1471,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
return new LSLFloat(i.value);
|
||||
}
|
||||
|
||||
static public implicit operator LSLFloat(string s)
|
||||
static public explicit operator LSLFloat(string s)
|
||||
{
|
||||
return new LSLFloat(double.Parse(s));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user