Returns the angle in radians of two input values, i.e. the angle from the x-axis to a point (y,x).
Syntax
ATAN2(Value y, Value x)
Input
Value y | is a value in vertical direction (y-coordinate) | |
Domain type: | any Value domain | |
Value x | is a value in horizontal direction (x-coordinate) | |
Domain type: | any Value domain |
Output
ATAN2 returns: | a real value in radians |
Domain: | system domain Value |
Value range: | [-p,p] |
Notes:
Tips:
Usable in
MapCalc, TabCalc, Simple calculators
Examples
Pocket line calculator examples:
? ATAN2(-1,-1) |
returns -2.356 |
? ATAN2(1.571,PI) | returns 0.464 |
? RADDEG(ATAN2(PI,PI) | returns 45 |
MapCalc example:
OutMap = ATAN2(DY,DX)
DY |
DX |
OutMap |
|||||||||||||||||||||||||||
|
|
|
TabCalc example:
OutCol1 = ATAN2(DY,DX)
OutCol2 = RADDEG(ATAN2(DY,DX))
DY |
DX |
OutCol1 |
OutCol2 |
2.0 |
8.1 |
0.242 |
13.87 |
1.0 |
7.3 |
0.136 |
7.80 |
0.5 |
-2.0 |
2.897 |
165.96 |
0.2 |
14.0 |
0.014 |
0.82 |
0.3 |
0.0 |
1.571 |
90.00 |
-1.0 |
? |
? |
? |
? |
-1.5 |
? |
? |
-0.4 |
-5.8 |
-3.073 |
183.95 |
-0.1 |
-0.6 |
-2.976 |
189.46 |
See also: