RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.Sin Function

Returns the sine of the angle in radians.

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

In Delphi code, the Sin function returns the sine of the argument. 

X is a real-type expression. Sin returns the sine of the angle X in radians.  

Delphi Examples: 

 

{
This example uses the Sine trig function to compute
the sine of Pi.
}
procedure TForm1.Button1Click(Sender: TObject);
var
  R: Extended;
  S: string;
begin
  R := Sin(Pi);
  Str(R:5:3, S);
  Canvas.TextOut(10, 10, 'The Sin of Pi is ' + S);
end;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!