Skip to content

tan ​

The tan() method returns the tangent of an angle expressed in radians. Tangent is the ratio between the sine and cosine of an angle (tan = sin/cos).

Interactive example ​

Syntax ​

typescript
function tan<
	GenericInput extends number,
>(
	input: GenericInput
): number

Parameters ​

  • input: The angle in radians for which to calculate the tangent.

Return value ​

The tangent of the given angle. The value tends toward infinity when the angle approaches π/2 (90°) or -π/2 (-90°).

See also ​

  • sin - Calculates the sine of an angle
  • cos - Calculates the cosine of an angle
  • atan - Calculates the arctangent

Sources ​

Released under the MIT license.