elasticsearch/docs/reference/esql/functions/atan2.asciidoc

37 lines
711 B
Plaintext

[discrete]
[[esql-atan2]]
=== `ATAN2`
*Syntax*
[.text-center]
image::esql/functions/signature/atan2.svg[Embedded,opts=inline]
*Parameters*
`y`::
Numeric expression. If `null`, the function returns `null`.
`x`::
Numeric expression. If `null`, the function returns `null`.
*Description*
The {wikipedia}/Atan2[angle] between the positive x-axis and the ray from the
origin to the point (x , y) in the Cartesian plane, expressed in radians.
*Supported types*
include::types/atan2.asciidoc[]
*Example*
[source.merge.styled,esql]
----
include::{esql-specs}/floats.csv-spec[tag=atan2]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/floats.csv-spec[tag=atan2-result]
|===