Equana

Back to Symbolic Math (SymEngine)

sym.atan2

Computes the two-argument arctangent of symbolic expressions.

Syntax

sym.atan2(y, x)

Description

Computes the two-argument arctangent of symbolic expressions. Returns the angle θ in (-π, π] such that (cos(θ), sin(θ)) is proportional to (x, y). This is the angle of the vector (x, y) from the positive x-axis, correctly handling all four quadrants.

Parameters

NameDescription
y- The y-coordinate (opposite side / numerator in y/x).
x- The x-coordinate (adjacent side / denominator in y/x).

Returns

Expr