PHP atan() Function

❮ PHP Math Reference

Example

Return the arc tangent of different numbers with 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));
?>
Try it Yourself »

Definition and Usage

The atan() function returns the arc tangent of arg as a numeric value between -Pi/2 and Pi/2 radians.


Syntax

atan(arg);

Parameter Values

Parameter Description
arg Required. Specifies an argument to process

Technical Details

Return Value: The arc tangent of arg in radians
Return Type: Float
PHP Version: 4+

❮ PHP Math Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.