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

ArcTan
Sin
Cos

Related commands
ArcCosThe Arc Cosine of a number, returned in radians
ArcSinThe Arc Sine of a number, returned in radians
ArcTanThe Arc Tangent of a number, returned in radians
CosThe Cosine of a number
SinThe Sine of a number
 Download this web site as a Windows program.




 
Example code : Get the Tangent of 45 degrees
var
  float : single;
begin
  // The Tangent of 45 degrees = 1.0
  float := Tan(PI/4);  // = 180/4 = 45 degrees
  ShowMessage('Tan(PI/4) = '+FloatToStr(float));
end;
Show full unit code
  Tan(PI/4) = 1
 
Delphi Programming © Neil Moffatt 2002 - 2022. All rights reserved.  |  Home Page