contents   index   previous   next



Math.sin()

syntax:

Math.sin(x)

where:

x - an angle in radians.

 

return:

number - the sine 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 sine of x:

function compute_sin(x)

{

   return Math.sin(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

 


Math.sqrt()