ATAN2

The ATAN2 function returns the arc tangent of Expression1 and Expression2.

SQL syntax

ATAN2(Expression1,Expression2)

Parameters

ATAN2 has the parameters:

Parameter Description

Expression1

Operand or column can be any numeric data type or any non-numeric data type that can be implicitly converted to a numeric data type.

Expression2

Operand or column can be any numeric data type or any non-numeric data type that can be implicitly converted to a numeric data type.

Description

  • Expression1 can be in an unbounded range. ATAN2 returns a value in the range of -pi to pi depending on the signs of Expression1 and Expression2, expressed in radians.

  • If Expression is of type NUMBER, the data type returned is NUMBER. For all other numeric data types, the data type returned is BINARY_DOUBLE.

  • If the value of Expression1 or Expression2 is NULL, or the value of both Expression1 and Expression2 are NULL, NULL is returned.

Example

Use the ATAN2 function to return the arc tangent of .3 and .2.

Command> SELECT ATAN2(.3,.2) "Arc tangent of .3 and .2" FROM dual;
< .9827937232473290679857106110146660144997 >
1 row found.