fix the comment about return value of osAngleBetween() its 0 to PI

httptests
UbitUmarov 2018-04-04 01:25:49 +01:00
parent e031d79d48
commit 80c7ffeb29
1 changed files with 2 additions and 2 deletions

View File

@ -4825,11 +4825,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return LSL_Vector.MagSquare(a - b); return LSL_Vector.MagSquare(a - b);
} }
// returns the angle between 2 vectors -pi to pi // returns the angle between 2 vectors 0 to pi
public LSL_Float osAngleBetween(LSL_Vector a, LSL_Vector b) public LSL_Float osAngleBetween(LSL_Vector a, LSL_Vector b)
{ {
double dot = LSL_Vector.Dot(a,b); double dot = LSL_Vector.Dot(a,b);
double mcross = LSL_Vector.Mag(LSL_Vector.Cross(a,b)); double mcross = LSL_Vector.Mag(LSL_Vector.Cross(a,b));
return Math.Atan2(mcross, dot); return Math.Atan2(mcross, dot);
} }
} }