EsbDecimals - a Free Subset of ESBPCS for .NET

DecimalOps.AdjustAngleRad Method (Int32, Boolean)

Adjust the Angle so that it lies between -PI (exclusive) and PI (inclusive) if posAngle is False, or between 0 (inclusive) and 2 * PI (exclusive) if posAngle is True. Works in Radians.

[Visual Basic]
Overloads Public Shared Function AdjustAngleRad( _
   ByVal angleInRadians As Integer, _
   ByVal posAngle As Boolean _
) As Decimal
[C#]
public static decimal AdjustAngleRad(
   int angleInRadians,
   bool posAngle
);

Parameters

angleInRadians
Angle in Radians
posAngle
When true the Angle returned is Positive, ie between 0 and 2PI, when false then the Angle is between -PI and PI.

Return Value

Adjusted Angle in Radians

See Also

DecimalOps Class | Esb.Math Namespace | DecimalOps.AdjustAngleRad Overload List