Adjust the Angle so that it lies between -180 (exclusive) and 180 (inclusive)
if posAngle is False, or between 0 (inclusive) and 360 (exclusive)
if posAngle is True.
Works in Degrees.
[Visual Basic] Overloads Public Shared Function AdjustAngleDeg( _ ByVal angleInDegrees As Decimal, _ ByVal posAngle As Boolean _ ) As Decimal
[C#] public static decimal AdjustAngleDeg( decimalangleInDegrees, boolposAngle );
Parameters
angleInDegrees
Angle in Degrees
posAngle
When true the Angle returned is Positive, ie
between 0 and 360, when false then the Angle is between -180 and 180.