ATAN2

functionsupportedCore SQL functions

docs.snowflake.com ↗

Numeric functions

Computes the inverse tangent (arc tangent) of the ratio of its two arguments. For example, if x > 0, then the expression ATAN2(y, x) is equivalent to ATAN(y/x). The arc tangent is the angle between: - The X axis. - The ray from the point (0,0) to the point (X, Y) (where X and Y are not both 0).

Syntax

ATAN2( <y> , <x> )

Parameters

NameRequiredDescription
yrequiredThis parameter is the Y coordinate of the point at the end of the ray. The data type must be FLOAT.
xrequiredThis parameter is the X coordinate of the point at the end of the ray. The data type must be FLOAT.

Returns

This function returns a value of type FLOAT. The returned value is in radians, not degrees. The returned value is a number in the interval [-pi, pi].

Usage notes

See also