Return the arctangent of different numbers through the atan() function:
<?phpecho(atan(0.50) . "<br>");echo(atan(-0.50) . "<br>");echo(atan(5) . "<br>");echo(atan(- 5) . "<br>");echo(atan(100) . "<br>");echo(atan(-100));?>The atan() function returns the arc tangent of arg , and the return value is a value between -Pi/2 and Pi/2.
atan( arg );
parameter | describe |
---|---|
arg | Required. Specifies the parameters to be processed. |
Return value: | The arctangent of arg , in radians. |
---|---|
Return type: | Float |
PHP version: | 4+ |