contents   index   previous   next



Math.atan2()

syntax:

Math.atan2(x, y)

where:

x - x coordinate of the point.

 

x - y coordinate of the point.

 

return:

number - an implementation-dependent approximation to the arc tangent of the quotient, y/x, of the arguments y and x, where the signs of the arguments are used to determine the quadrant of the result.

 

description:

It is intentional and traditional for the two-argument arc tangent function that the argument named y be first and the argument named x be second. The return value is expressed in radians and ranges from -pi to +pi.

 

example:

//The arctangent of the quotient y/x 

//is returned in the

//following function:

function compute_arctangent_of_quotient(x, y)

{

   return Math.arctangent2(x, y)

}

 


Math.ceil()