Math.atan2

Math.atan2

Class Overview | Class Members | This Package | All Packages

Syntax
public static native double atan2( double a, double b )
Parameters
a
a double value.
b
a double value.
Returns
the theta component of the point (rtheta) in polar coordinates that corresponds to the point (ba) in Cartesian coordinates.
Description
Converts rectangular coordinates (ba) to polar (r, theta). This method computes the phase theta by computing an arc tangent of b/a in the range of -pi to pi.