Difference between revisions of "Radians"

From SCAR Divi Manual
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
function Radians(const Degrees: Extended): Extended;
 
function Radians(const Degrees: Extended): Extended;
 
begin
 
begin
   Result := Degrees * (PI / 180);
+
   Result := Degrees * (Pi / 180);
 
end;
 
end;
 
</source>
 
</source>
Line 16: Line 16:
  
 
==Description==
 
==Description==
Converts an angle defined in [http://en.wikipedia.org/wiki/Degree_%28angle%29 degrees] to an angle defined in [http://en.wikipedia.org/wiki/Radian radians].
+
Converts an angle defined in [http://en.wikipedia.org/wiki/Degree_%28angle%29 degrees] specified by '''Degrees''' to an angle defined in [http://en.wikipedia.org/wiki/Radian radians].
  
 
==Example==
 
==Example==
Line 34: Line 34:
 
*[[FixR]]
 
*[[FixR]]
 
*[[AdjustR]]
 
*[[AdjustR]]
 +
*[[Pi]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Math Functions]]
 
[[Category:Math Functions]]

Latest revision as of 00:42, 29 June 2011

Definition

function Radians(const Degrees: Extended): Extended;

Source

function Radians(const Degrees: Extended): Extended;
begin
  Result := Degrees * (Pi / 180);
end;

Availability

SCAR Divi 3.00 > Current

Description

Converts an angle defined in degrees specified by Degrees to an angle defined in radians.

Example

begin
  WriteLn(Radians(180));
  WriteLn(Radians(90) * 2);
end.

Output:

3,14159265358979
3,14159265358979

See Also