Add casts from integer to float. Fix issue 1822.

This commit is contained in:
Mike Mazur
2008-07-25 07:50:31 +00:00
parent 84cc69573b
commit 19ad7db5e1
3 changed files with 41 additions and 1 deletions

View File

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

View File

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