Core Function ATan2

From Sputnik Wiki
Jump to: navigation, search
ATan2( <expression>, <expression2> )

Contents

Description

Compute arc tangent with two parameters.

Parameters

expression

Any valid numeric expression.

expression2

Any valid numeric expression.

Return Value

Returns the angle whose tangent is the quotient of two specified numbers.

Remarks

Principal arc tangent of y/x, in the interval [-pi,+pi] radians.

Example

$x = -10.0;
$y = 10.0;
$result = 0;
$result = Atan2($y, $x) * 180 / @PI;
printf("The arc tangent for (x=$x, y=$y) is $result degrees.\n");
// Prints The arc tangent for (x=-10.000000, y=10.000000) is 135.000000 degrees.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox