ATAN2: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
(Created page with "{{DISPLAYTITLE:_ATAN2}} The _ATAN2 function returns the radian angle between the positive x-axis of a plane and the point given by the coordinates (x, y). {{PageSyntax}} : {{Parameter|angle!}} = _ATAN2({{Parameter|y}}, {{Parameter|x}}) {{Parameters}} * {{Parameter|y}} is the vertical axis position (row) as a positive, zero or negative floating point value. * {{Parameter|x}} is the horizontal axis position (column) as a positive, zero or negative floating poin...") |
m (Protected "ATAN2" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))) |
(No difference)
|
Revision as of 13:09, 29 April 2022
The _ATAN2 function returns the radian angle between the positive x-axis of a plane and the point given by the coordinates (x, y).
Syntax
- angle! = _ATAN2(y, x)
- y is the vertical axis position (row) as a positive, zero or negative floating point value.
- x is the horizontal axis position (column) as a positive, zero or negative floating point value.
Description
- The DOUBLE radian angle returned is positive for upper row values where y > 0.
- The DOUBLE radian angle returned is 0 when x > 0 and _PI when x < 0 where y = 0
- The DOUBLE radian angle returned is negative for lower row values where y < 0.
- _ATAN2(0, 0) is undefined and the function returns 0 instead of a division error.
See also
- ATN (arctangent)
- _PI (QB64 function)
- Mathematical Operations
- Atan2 reference