Difference between revisions of "MC-Basic:ATAN2"
Line 4: | Line 4: | ||
|SYNTAX= | |SYNTAX= | ||
− | Atan2('' | + | Atan2(<''expression''>, <''expression''>) |
|AVAILABILITY= | |AVAILABILITY= | ||
Line 10: | Line 10: | ||
|DESCRIPTION= | |DESCRIPTION= | ||
− | ATAN2 is used when it is necessary to know not only the absolute value of the angle, but also the quadrant. The first expression is the value on the y axis and the second is the value on the x axis. The result gives the real angle in the range | + | ATAN2 is used when it is necessary to know not only the absolute value of the angle, but also the quadrant. The first expression is the value on the y axis and the second is the value on the x axis. The result gives the real angle in the range ±π radians. |
− | |||
|TYPE= | |TYPE= | ||
Line 17: | Line 16: | ||
|RANGE= | |RANGE= | ||
− | + | ±MaxDouble | |
|UNITS= | |UNITS= | ||
Line 32: | Line 31: | ||
|EXAMPLE= | |EXAMPLE= | ||
− | ?Atan2(1, -1) ‘returns 0. | + | ?Atan2(1, -1) ‘returns 0.75×π<br> |
− | ?Atan2(-1, 1) ‘returns -0. | + | ?Atan2(-1, 1) ‘returns -0.25×π |
|SEE ALSO= | |SEE ALSO= |
Revision as of 13:43, 16 March 2014
ATAN2 is used when it is necessary to know not only the absolute value of the angle, but also the quadrant. The first expression is the value on the y axis and the second is the value on the x axis. The result gives the real angle in the range ±π radians.
Syntax
Atan2(<expression>, <expression>)
Availability
All versions
Type
Double
Range
±MaxDouble
Scope
Configuration, Task or Terminal
Limitations
Read-Only
Examples
?Atan2(1, -1) ‘returns 0.75×π
?Atan2(-1, 1) ‘returns -0.25×π