Difference between revisions of "FixR"
From SCAR Divi Manual
(→Availability) |
(→Availability) |
||
Line 15: | Line 15: | ||
SCAR Divi 3.00 > Current | SCAR Divi 3.00 > Current | ||
− | *Before SCAR Divi 3.25 | + | *Before SCAR Divi 3.25, this function was broken. |
==Description== | ==Description== |
Latest revision as of 10:30, 1 July 2011
Definition
function FixR(Radians: Extended): Extended;
Source
function FixR(Radians: Extended): Extended; begin Result := FixD(Radians * (180 / Pi)) * (Pi / 180); end;
Availability
SCAR Divi 3.00 > Current
- Before SCAR Divi 3.25, this function was broken.
Description
Fixes an angle specified by Radians in radians by adding/subtracting 2π until the value is part of the range [0,2π[.
Example
begin WriteLn(FixR(Pi)); WriteLn(FixR(-Pi)); WriteLn(FixR(2 * Pi)); WriteLn(FixR(3 * Pi)); end.
Output:
3,14159265358979 3,14159265358979 0 3,14159265358979