Raw int numbers (ex.LSL Constants) are displayed like "1.000000" when type cast to string

bulletsim
Makopoppo 2011-07-05 22:19:26 +09:00 committed by Justin Clark-Casey (justincc)
parent f680c13495
commit df586c9d25
1 changed files with 11 additions and 0 deletions

View File

@ -1396,6 +1396,12 @@ namespace OpenSim.Region.ScriptEngine.Shared
string s = String.Format(Culture.FormatProvider, "{0:0.000000}", f.value);
m_string=s;
}
public LSLString(int i)
{
string s = String.Format("{0}", i);
m_string = s;
}
public LSLString(LSLInteger i)
{
@ -1469,6 +1475,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
{
return new LSLString(d);
}
static public explicit operator LSLString(int i)
{
return new LSLString(i);
}
public static explicit operator LSLString(LSLFloat f)
{