mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
fix the comment about return value of osAngleBetween() its 0 to PI
This commit is contained in:
@@ -4825,11 +4825,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user