Macaulay2 » Documentation
Packages » Python » PythonObject » atan2(PythonObject,PythonObject)
next | previous | forward | backward | up | index | toc

atan2(PythonObject,PythonObject) -- arc tangent of quotient of python objects

Description

This calls Python's built-in math.atan2 function, which computes the arc tangent of $frac{y}{x}$ between $-\pi$ and $\pi$.

i1 : atan2(toPython 1, toPython 1)

o1 = 0.7853981633974483

o1 : PythonObject of class float
i2 : atan2(toPython(-1), toPython(-1))

o2 = -2.356194490192345

o2 : PythonObject of class float

If one of the arguments is a Macaulay2 object, then it is first converted to a Python object before computing the arc tangent.

i3 : atan2(1, toPython 1)

o3 = 0.7853981633974483

o3 : PythonObject of class float
i4 : atan2(toPython 0, 1)

o4 = 0.0

o4 : PythonObject of class float

See also

Ways to use this method:


The source of this document is in Python/doc/trig.m2:109:0.