mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
Add casts from integer to float. Fix issue 1822.
This commit is contained in:
@@ -1454,6 +1454,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
return new LSLFloat(i);
|
||||
}
|
||||
|
||||
static public implicit operator LSLFloat(LSLInteger i)
|
||||
{
|
||||
return new LSLFloat(i.value);
|
||||
}
|
||||
|
||||
static public implicit operator LSLFloat(string s)
|
||||
{
|
||||
return new LSLFloat(double.Parse(s));
|
||||
|
||||
@@ -1509,6 +1509,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
return new LSLFloat(i);
|
||||
}
|
||||
|
||||
static public implicit operator LSLFloat(LSLInteger i)
|
||||
{
|
||||
return new LSLFloat(i.value);
|
||||
}
|
||||
|
||||
static public implicit operator LSLFloat(string s)
|
||||
{
|
||||
return new LSLFloat(double.Parse(s));
|
||||
|
||||
Reference in New Issue
Block a user