Math.tan()

Math.tan(x) → number

Returns the tangent of x.

Returns the tangent of the angle x, given in radians.

Arguments

NameTypeRequiredDefaultDescription
x number optional — An angle in radians.

Returns

number The tangent of x.

Example

let t = Math.tan(Math.PI / 4); // 0.9999999999999999