PHP deg2rad

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

PHP deg2rad() function

Description

The deg2rad() function is used to convert a number in degrees to its radian (the standard unit of angular measure, used in many areas of mathematics) equivalent.

Version

(PHP 4 and above)

Syntax

deg2rad (num)

Parameter

Name

Description

Required /
Optional

Type

num

Angular value in degree.

Required

Float

Return value

The radian equivalent of num.

Value Type : Float.

Pictorial Presentation

php math deg2rad() function

Example :

  1.  '
    ';echo deg2rad("20") .  

  2.   '
    ';echo deg2rad("90") .  

  3.    '
    ';?>  

  4.      

Output :

0.78539816339745
0.34906585039887
1.5707963267949