DelphiBasics
ArcTan
Function
The Arc Tangent of a number, returned in radians System unit
 function ArcTan(const Number Extended):Extended;
Description
The ArcTan function is a mathematical function giving the value in radians of the Arc Tangent of Number.
 
PI radians  = 180 degrees
Notes
The System unit supports only the following angular functions:

ArcTan
Sin
Cos


Special floating point values INF, -INF yield +PI/2 and -PI/2 respectively.
Related commands
ArcCosThe Arc Cosine of a number, returned in radians
ArcSinThe Arc Sine of a number, returned in radians
CosThe Cosine of a number
SinThe Sine of a number
TanThe Tangent of a number
 Download this web site as a Windows program.




 
Example code : Get the ArcTan of PI/2
var
  float : single;
begin
  // The ArcTan of PI/2 should give 1.0
  float := ArcTan(PI/2);
  ShowMessage('ArcTan of PI/2 = '+FloatToStr(float));
end;
Show full unit code
  ArcTan of PI/2 = 1.00388479232788
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page