RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.ArcTan Function

Calculates the arctangent of a given number.

Pascal
function ArcTan(const X: Extended): Extended;
C++
Extended ArcTan(const Extended X);

System

In Delphi code, ArcTan returns the arctangent of X. 

X is a real-type expression that gives an angle in radians.  

Delphi Examples: 

 

{
This example shows how to use the ArcTan and FloatToStr
functions.
}
procedure TForm1.Button1Click(Sender: TObject);
var
  ex : Extended;
  mystring : String;
begin
  ex := 16 * ArcTan(1/5) - 4 * ArcTan(1/239); // Machin's formula
  mystring := FloatToStr(ex);
  Edit2.Text := mystring;
end;

procedure TForm1.FormCreate(Sender: TObject);
var
  ex : Extended;
  myString : String;
begin
  ex := Pi;
  mystring := FloatToStr(ex);
  Edit1.Text := mystring;
end;

 

Cos 

Sin 

ArcTan2 

Tan 

ArcSin 

ArcCos

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!