mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
add osSlerp()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user