Easy Tutorial
❮ Func String Printf Func Simplexml Construct ❯

PHP atan2() Function

PHP Math Reference Manual

Example

Return the arc tangent of two variables using the atan2() function:


Definition and Usage

The atan2() function returns the arc tangent of variables x and y.


Syntax

Parameter Description
y Required. Specifies the dividend.
x Required. Specifies the divisor.

Technical Details

Return Value: The arc tangent of y/x in radians, ranging between -Pi and Pi.
Return Type: Float
--- ---
PHP Version: 4+
--- ---

❮ Func String Printf Func Simplexml Construct ❯