ATAN2 scalar function

Returns the arctangent of x and y coordinates as an angle expressed in radians. The x and y coordinates are specified by the first and second arguments, respectively.

Read syntax diagramSkip visual syntax diagramATAN2(expression1,expression2)

The schema is SYSIBM. (The SYSFUN version of the ATAN2 function continues to be available.)

expression1
An expression that returns a value of any built-in numeric data type except for DECFLOAT. The value is converted to a double-precision floating-point number for processing by the function.
expression2
An expression that returns a value of any built-in numeric data type except for DECFLOAT. The value is converted to a double-precision floating-point number for processing by the function.

The result of the function is a double-precision floating-point number. The result can be null if the argument can be null or the database is configured with dft_sqlmathwarn set to YES; the result is the null value if the argument is null.