September 2001
Intermediate to advanced
768 pages
32h 45m
English
float atan2(float x, float y)
Returns the arctangent based on an XY coordinate.
Returns:
Arctangent as a float
Description:
This function returns the value of the arctangent of the point denoted by the x and y parameters. The return value is in radians, in the range -pi to pi (approximately -3.14 to 3.14).
Version:
PHP 3 since 3.0.5, PHP 4
See also:
acos() asin() atan() cos() sin() tan()
Example:
$tanx = -1; $tany = 1; echo "The arctangent of $tanx/$tany is ", atan2($tanx, $tany); |
Read now
Unlock full access