AdjustAngleRad Function
Adjusts a value in Radians, so that it lies in between 0 and 2 * Pi.

Unit
QESBPCSMath

Declaration
Function AdjustAngleRad(const X: Extended): Extended;

Parameters
Value in Radians.

Category
Arithmetic Routines for Floats

Implementation

function AdjustAngleRad (const X: Extended): Extended;
begin
     Result := X;
     if Result > TwoPi then
          Result := Result - Int (Result / TwoPi) * TwoPi;
     if Result < 0 then
          Result := Result + Int (abs (Result) / TwoPi + 1) * TwoPi;
End;


HTML generated by Time2HELP
http://www.time2help.com