ATAN2
Last updated
Was this helpful?
Last updated
Was this helpful?
The function ATAN2 returns the arctan2 of given x and y coordinates.
This function takes two , call them x and y, as input. It returns another Number: the angle, in radians, between the positive x-axis and the ray to the point (x, y).
x (required, type: Number
) Any number; this represents the x-coordinate.
y (required, type: Number
) Any number; this represents the y-coordinate.
arctangent (type: Number
) The angle, in radians, between the positive x-axis and the ray to the point (x, y).
The following example returns the arctan2 of the coordinates (1, 1). Note that the angle between the positive x-axis and the ray to the point (1, 1) is forty-five degrees, or 0.25Ï€ radians, but the ATAN2 function doesn't output an angle in degrees or in radians in terms of pi. Rather, it provides a numerical estimation of the angle in radians:
To calculate the arctan2 in degrees, the ATAN2 function must be used in tandem with the function, such as in the following example:
ATAN2 can also be used in tandem with the function to provide insight into how the angle in radians relates to terms of pi, such as in the following example: