ATAN2 function 
Overview 
ATAN2 is a function of the Math and Trigonometry category that calculates the inverse tangent (arctangent) for the specified x and y coordinates. The arctangent returns the angle defined by the x-axis and a line defined by the origin and a point with coordinates (x,y). The returned angle is expressed in radians, in the range (-
Usage 
Syntax 
ATAN2(x,y) => atan2
Argument descriptions 
Additional guidance 
If the returned value is positive, it represents a counterclockwise angle from the x-axis, while a negative value represents a clockwise angle.
 ATAN2(x,y) is equivalent to ATAN(y/x), with the difference that the x argument in ATAN2 can be 0.
Returned value 
ATAN2 returns a number in radians in the range (-
Error conditions 
- In common with many other IronCalc functions, ATAN2 propagates errors that are found in its argument.
 - If no argument, or arguments other than 2, are supplied, then ATAN2 returns the 
#ERROR!error. - If the value of either the x or y argument is not (or cannot be converted to) a number, then ATAN2 returns the 
#VALUE!error. - If both x and y are equal to 0, ATAN2 returns a 
#DIV/0!error. - For more information about the different types of errors that you may encounter when using IronCalc functions, visit our Error Types page.
 
Details 
- The ATAN2 function utilizes the atan2() method provided by the Rust Standard Library.
 
Examples 
See some examples in IronCalc.
Links 
- For more information about inverse trigonometric functions, visit Wikipedia's Inverse trigonometric functions page.
 - See also IronCalc's ATAN, TAN and ASIN functions.
 - Visit Microsoft Excel's ATAN2 function page.
 - Both Google Sheets and LibreOffice Calc provide versions of the ATAN2 function.