contents   index   previous   next



Math.tan()

syntax:

Math.tan(x)

where:

x - an angle measured in radians.

 

return:

number - the tangent of x, expressed in radians.

 

description:

Returns NaN if x cannot be converted to a number. In order to convert degrees to radians you must multiply by 2pi/360.

 

example:

//Return the tangent of x:

function compute_tan(x)

{

   return Math.tan(x)

}

//If the argument is NaN, the result is NaN

//If the argument is +0, the result is +0

//If the argument is -0, the result is -0

//If the argument is +infinity or -infinity, 

//the result is NaN