DelphiBasics
RadToDeg
Function
Converts a radian value to degrees Math unit
 function RadToDeg(const Radians Extended):Extended;
Description
The RadToDeg function is a mathematical function converting the Radians value into Degrees.
 
PI radians = 180 degrees
Related commands
CelsiusToFahrenheitConvert a celsius temperature into fahrenheit
ConvertConvert one measurement value to another
DegToRadConvert a degrees value to radians
FahrenheitToCelsiusConvert a fahrenheit temperature into celsius
 Download this web site as a Windows program.




 
Example code : Use to display the result of an ArcSin calculation in degrees
var
  float : single;
begin
  // The ArcSin of 0.5 should give 30 degrees
  float := ArcSin(0.5);
  float := RadToDeg(float);  // Convert result to degrees
  ShowMessage('ArcSin of 0.5 = '+FloatToStr(float)+' degrees');
end;
Show full unit code
  ArcSin of 0.5 = 30 degrees
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page