mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
Thank you, OwenOyen, for a patch that corrects the behavior of llRot2Euler.
Committed with comment changes. Fixes Mantis #3412
This commit is contained in:
@@ -454,11 +454,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
// Utility function for llRot2Euler
|
||||
|
||||
// normalize an angle between 0 - 2*PI (0 and 360 degrees)
|
||||
// normalize an angle between -PI and PI (-180 to +180 degrees)
|
||||
private double NormalizeAngle(double angle)
|
||||
{
|
||||
angle = angle % (Math.PI * 2);
|
||||
if (angle < 0) angle = angle + Math.PI * 2;
|
||||
// if (angle < 0) angle = angle + Math.PI * 2;
|
||||
return angle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user