PHP atan

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : atan() function

Description

The atan() function returns the arc tangent of a number as a numeric value in radians.

Version

(PHP 4 and above)

Syntax

atan( number )

Parameter

Name

Description

Required /
Optional

Type

number

Numeric value.

Required

Float

 

Return value

The arc tangent of a number.

Value Type : Float.

Pictorial Presentation

php math atan() function

Example :

  1. $val1= 0;  

  2. $val2=.4;  

  3. $zatan1=atan($val1);  

  4. $zatan2=atan($val2);  

  5. echo "Arc tangent of $val1 is $zatan1
    ";  

  6. echo "Arc tangent of $val2 is $zatan2
    ";  

  7. ?>  

Output :

Arc tangent of 0 is 0
Arc tangent of 0.4 is 0.380506377112