Skip to content

arctan2

Vašek edited this page Jan 13, 2019 · 8 revisions

arctan2

Calculates the inverse tangent and returns an angle in radians

Syntax:

arctan2(x, n)
Argument Description
double x Opposite side of triangle
double y Adjacent side of triangle

Returns: double

Description:

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().

Example:

double value;
value = arctan2(1, -1);

This code set value to 2,356195.

Example 2:

double value;
value = arctan2(1, 0);

This code set value to 1,570797.

Back to number_functions

Clone this wiki locally