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
): numberParameters
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 anglecos- Calculates the cosine of an angleatan- Calculates the arctangent
