PHP atan()Functions

PHP Math 参考手册PHP Math Reference Manual

Examples

Return the arctangent of different numbers via the atan() function:

<?php
echo(atan(0.50) . "<br>");
echo(atan(-0.50) . "<br>");
echo(atan(5) . "<br>");
echo(atan(-5) . "<br>");
echo(atan(100) . "<br>");
echo(atan(-100));
?>

Run example »

Definition and Usage

The atan() function returnsargthe arctangent, the return value is a value between -Pi/2 and Pi/2.


Syntax

atan(arg);

Parameters Description
arg Required. Specifies the parameter to process.

Technical Details

Return value: argthe arctangent, in radians.
Return type: Float
PHP version: 4+


PHP Math 参考手册PHP Math Reference Manual Other Extensions