Link Search Menu Expand Document

ATAN2

Two-argument arc tangent function. Calculates the angle, in radians, between the specified positive x-axis value and the ray from the origin to the point (y,x).

Syntax

ATAN2(<value_y>,<value_x>)

Parameters

Parameter Description Supported input types
<value_y> The y value in the arc tangent calculation DOUBLE PRECISION
<value_x> The x value in the arc tangent calculation DOUBLE PRECISION

Return Type

DOUBLE PRECISION

Example

The following example returns the arc tangent with the values (11, 3):

SELECT ATAN2(11,3);

Returns: 1.3045442776439713