Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Calculates the angle, in radians, between the positive x-axis and the ray from the origin to the point (y, x).
atan2(
y,
x)
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
y | real |
✔️ | The Y coordinate. |
x | real |
✔️ | The X coordinate. |
Returns the angle in radians between the positive x-axis and the ray from the origin to the point (y, x).
The following example returns the angle measurements in radians.
print atan2_0 = atan2(1,1) // Pi / 4 radians (45 degrees)
| extend atan2_1 = atan2(0,-1) // Pi radians (180 degrees)
| extend atan2_2 = atan2(-1,0) // - Pi / 2 radians (-90 degrees)
Output
atan2_0 | atan2_1 | atan2_2 |
---|---|---|
0.785398163397448 | 3.14159265358979 | -1.5707963267949 |