-
-
Notifications
You must be signed in to change notification settings - Fork 18
arctan2
Vašek edited this page Jan 13, 2019
·
8 revisions
Calculates the inverse tangent and returns an angle in radians
arctan2(x, n)
Argument | Description |
---|---|
double x |
Opposite side of triangle |
double y |
Adjacent side of triangle |
Returns: double
This function returns the inverse tangent of y/x in radians, where y
is the opposite side of triangle and x
is the adjacent side of triangle. If you want to return degrees instead of radians use function darctan2()
.
double value;
value = arctan2(1, -1);
This code set value
to 2,356195.
double value;
value = arctan2(1, 0);
This code set value
to 1,570797.
Back to number_functions