ee.Number.tan

Computes the tangent of the input in radians.

UsageReturns
Number.tan()Number
ArgumentTypeDetails
this: inputNumber

The input value.

Examples

Code Editor (JavaScript)

// Input angle in radians.
print('Tangent of 0', ee.Number(0).tan());  // 0
print('Tangent of π/2', ee.Number(Math.PI/2).tan());  // 16331239353195370
print('Tangent of π', ee.Number(Math.PI).tan());  // 0 (nearly)

// Convert degrees to radians.
var degrees = 45;
var radians = degrees * (Math.PI/180);
print('Tangent of 45 degrees', ee.Number(radians).tan());  // 1 (nearly)