On this page
math.atan
Prev: math.asinh | Up: math | Next: math.atan2
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.atan
Tags: #public #python3 #stdlib #math
Import
import math
from math import atan
Signature & Overview
math.atan(x, /)
Return the arc tangent (measured in radians) of x.
Usage
import math
assert math.isclose(math.atan(1.0), math.pi / 4)
Gotchas
- Returns radians in
(-pi/2, pi/2): For 2D vector angles(x, y)across all four quadrants, usemath.atan2(y, x)instead ofmath.atan(y / x).
REPL Inspect
from math import atan
help(atan)
Linked from
Related notes
- tuts/python3/stdlib_module/math/acos Linked here; links to this page; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/acosh Linked here; links to this page; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/asin Linked here; links to this page; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/asinh Linked here; links to this page; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math/atan2 Linked here; links to this page; shared tags: #math, #stdlib
- tuts/python3/stdlib_module/math Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib/math shared tags: #math, #stdlib
- tuts/c/stdlib/math/fabs shared tags: #math, #stdlib
- tuts/c/stdlib/math/floor shared tags: #math, #stdlib
- tuts/c/stdlib/math/isnan shared tags: #math, #stdlib