Difference between revisions of "Degrees"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function Degrees(Radians: Extended): Extended; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Converts an...") |
(→Definition) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | function Degrees(Radians: Extended): Extended; | + | function Degrees(const Radians: Extended): Extended; |
+ | </source> | ||
+ | |||
+ | ===Source=== | ||
+ | <source lang="scar"> | ||
+ | function Degrees(const Radians: Extended): Extended; | ||
+ | begin | ||
+ | Result := Radians * (180 / Pi); | ||
+ | end; | ||
</source> | </source> | ||
Line 8: | Line 16: | ||
==Description== | ==Description== | ||
− | Converts an angle defined in [http://en.wikipedia.org/wiki/Radian radians] to | + | Converts an angle defined in [http://en.wikipedia.org/wiki/Radian radians] specified by '''Radians''' to an angle defined in [http://en.wikipedia.org/wiki/Degree_%28angle%29 degrees]. |
==Example== | ==Example== | ||
Line 14: | Line 22: | ||
begin | begin | ||
WriteLn(Degrees(Pi)); | WriteLn(Degrees(Pi)); | ||
+ | WriteLn(Degrees(Pi / 2)); | ||
end. | end. | ||
</source> | </source> | ||
Line 19: | Line 28: | ||
Output: | Output: | ||
180 | 180 | ||
+ | 90 | ||
==See Also== | ==See Also== |
Latest revision as of 08:07, 28 June 2011
Definition
function Degrees(const Radians: Extended): Extended;
Source
function Degrees(const Radians: Extended): Extended; begin Result := Radians * (180 / Pi); end;
Availability
SCAR Divi 3.00 > Current
Description
Converts an angle defined in radians specified by Radians to an angle defined in degrees.
Example
begin WriteLn(Degrees(Pi)); WriteLn(Degrees(Pi / 2)); end.
Output:
180 90