atan() function in PHP


The atan() function return the arc tangent of a number. It returns a float, which is a numeric value between -Pi/2 and Pi/2 radians.

Syntax

atan(val)

Parameters

  • val − The value for which you want to get the arc tangent.

Return

The atan() function returns the arc tangent of a number.

Example

 Live Demo

<?php
   echo(atan(20) . "<br>");
   echo(atan(2) . "<br>");
   echo(atan(0.60) . "<br>");
   echo(atan(-0.60) . "<br>");
?>

Output

1.520837931073<br>1.1071487177941<br>0.54041950027058<br>-0.54041950027058<br>

Updated on: 26-Jun-2020

73 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements