public double osList2Double(LSL_Types.list src, int index)
{
// There is really no double type in OSSL. C# and other
// have one, but the current implementation of LSL_Types.list
// is not allowed to contain any.
// This really should be removed.
//
CheckThreatLevel(ThreatLevel.None, "osList2Double");
m_host.AddScriptLPS(1);
if (index < 0)
{
index = src.Length + index;
}
if (index >= src.Length)
{
return 0.0;
}
return Convert.ToDouble(src.Data[index]);
}