Thank you, OwenOyen, for a patch that corrects the behavior of llRot2Euler.

Committed with comment changes.
Fixes Mantis #3412
0.6.5-rc1
Melanie Thielker 2009-04-10 17:26:00 +00:00
parent 7c04c1e44c
commit 292672675a
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}