PHP atan() Function Example

PHP atan() Function Example


Posted in : PHP Posted on : January 28, 2011 at 6:02 PM Comments : [ 0 ]

If you want to find out the arc tangent of arg in radians then use atan().

PHP atan() Function Example:

If you want to find out the arc tangent of arg in radians then use atan(). The atan() function returns the arc tangent of arg in radians.

Syntax:

atan(x)

where x is required parameter.

Example:

<?php
$return = atan(1);
echo "The value of atan(1) is : " . $return . "<br />";

$return_value1 = atan(1.5);
echo "The value of atan(1.5) is : " . $return_value1 . "<br />";

$return_value2 = atan(-1.5);
echo "The value of atan(-1.5) is : " . $return_value2;
?> 

After running this example the output is:

Output:

The value of atan(1) is : 0.78539816339745
The value of atan(1.5) is : 0.98279372324733
The value of atan(-1.5) is : -0.98279372324733

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics