add osSlerp()

This commit is contained in:
UbitUmarov
2019-09-04 23:27:48 +01:00
parent 7771cc00c4
commit 93f13aa00d
5 changed files with 72 additions and 1 deletions

View File

@@ -5554,5 +5554,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
DateTime time = TimeZoneInfo.ConvertTime(DateTime.UtcNow, PSTTimeZone);
return time.TimeOfDay.TotalSeconds;
}
public LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount)
{
if(amount < 0)
amount= 0;
else if(amount > 1.0)
amount = 1.0;
a.Normalize();
b.Normalize();
return LSL_Rotation.Slerp(a, b, amount);
}
}
}