Core Function ATan2
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> ATan2( <expression>, <expression2> ) </pre> === Description === Compute arc tangent with two parameters. === Parameters === ==== expression ==== Any valid numeric expr...")
Newer edit →
(Created page with "<pre> ATan2( <expression>, <expression2> ) </pre> === Description === Compute arc tangent with two parameters. === Parameters === ==== expression ==== Any valid numeric expr...")
Newer edit →
Revision as of 16:11, 2 December 2011
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 = Atan($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.