elasticsearch/docs/reference/query-languages/esql/_snippets/functions/atan2.md
Colleen McGinnis b7e3a1e14b
[docs] Migrate docs from AsciiDoc to Markdown (#123507)
* delete asciidoc files

* add migrated files

* fix errors

* Disable docs tests

* Clarify release notes page titles

* Revert "Clarify release notes page titles"

This reverts commit 8be688648d.

* Comment out edternal URI images

* Clean up query languages landing pages, link to conceptual docs

* Add .md to url

* Fixes inference processor nesting.

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com>
Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
2025-02-27 17:56:14 +01:00

1.2 KiB

ATAN2 [esql-atan2]

Syntax

:::{image} ../../../../../images/atan2.svg :alt: Embedded :class: text-center :::

Parameters

y_coordinate
y coordinate. If null, the function returns null.
x_coordinate
x coordinate. If null, the function returns null.

Description

The 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

y_coordinate x_coordinate result
double double double
double integer double
double long double
double unsigned_long double
integer double double
integer integer double
integer long double
integer unsigned_long double
long double double
long integer double
long long double
long unsigned_long double
unsigned_long double double
unsigned_long integer double
unsigned_long long double
unsigned_long unsigned_long double

Example

ROW y=12.9, x=.6
| EVAL atan2=ATAN2(y, x)
y:double x:double atan2:double
12.9 0.6 1.5243181954438936