Python math.atan2() Method

Math Methods : Return the arc tangent of y/x in radians

Definition and Usage

The math.atan2() method returns the arc tangent of y/x, in radians. Where x and y are the coordinates of a point (x,y).

The returned value is between PI and -PI.

Syntax

math.atan2(y, x)

Parameter Values

Parameter Description
y Required. Specifies a positive or negative number
x Required. Specifies a positive or negative number

Technical Details

Return Value: A float value, representing arc tangent of y/x in radians, which is between PI and -PI
Python Version: 1.4