Function reference · Trigonometry
atan2
Computes the quadrant-aware two-argument arctangent atan2(y,x).
atan2 uses the signs of both coordinates to return an angle in the range (-pi,pi]. Axis cases and many exact ratios are simplified symbolically.
Examples
These examples use Nerdamer Notation.
Return the first-quadrant angle.
atan2(1,1) // → (1/4)*pi
Handle the positive y-axis.
atan2(1,0) // → (1/2)*pi
Interfaces
The same operation is available through the interfaces below.
Nerdamer Notation
Use this form inside input passed to nerdamer(...).
atan2(arg1, arg2)
nerdamer.atan2
Call the operation through the default nerdamer import.
nerdamer.atan2(y: ExpressionInput, x: ExpressionInput): Expression
Parameters
| Name | Type | Description |
|---|---|---|
y | ExpressionInput | The y-coordinate. |
x | ExpressionInput | The x-coordinate. |
Returns
Expression — The angle in radians.
