Python  1.0
Functions
trigonometry Namespace Reference

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 ()
 

Detailed Description

An arc tangent which considers the signs of both x and y, mimicking the behaviour of function atan2.

Author
Paulo Roma
Since

Function Documentation

◆ atan2d()

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).

Parameters
yy coordinate.
xx coordinate.
Returns
atan2(y,x) in degrees.

Referenced by main().

◆ main()

def trigonometry.main ( )

References atan2d(), and _01d_dec2bin.input.