ClojureDocs

Nav

Namespaces

Clojure/Conj 2026 — Charlotte, NC — Sept 30 - Oct 2 Learn More & Get Tickets →

atan2

clojure.math

Available since 1.11 (source)
  • (atan2 y x)
Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).
Computes the phase theta by computing an arc tangent of y/x in the range of -pi to pi.
For more details on special cases, see:
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#atan2-double-double-