![]() |
Python
1.0
|
An arc tangent which considers the signs of both x and y, mimicking the behaviour of function atan2. More...
Functions | |
def | atan2d (y, x) |
Computes the arc tangent (measured in degrees) of y/x. More... | |
def | main () |
An arc tangent which considers the signs of both x and y, mimicking the behaviour of function atan2.
def trigonometry.atan2d | ( | y, | |
x | |||
) |
Computes the arc tangent (measured in degrees) of y/x.
Unlike atan(y/x), the signs of both x and y are considered.
The two-argument atan2 function computes the arctangent of \(\frac{y}{x}\) given y and x, but with a range of \((-\pi, \pi]\). In other words, atan2(y, x) is the angle between the positive x-axis of a plane and the point (x, y) on it, with positive sign for counter-clockwise angles (upper half-plane, y > 0), and negative sign for clockwise angles (lower half-plane, y < 0).
y | y coordinate. |
x | x coordinate. |
Referenced by main().
def trigonometry.main | ( | ) |
References atan2d(), and _01d_dec2bin.input.