PHP rad2deg

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

PHP : rad2deg() function

Description

The rad2deg() function is used to convert a radian number to the equivalent number its degree.

Version

(PHP 4 and above)

Syntax

rad2deg(num)

Parameter

Name

Description

Required /
Optional

Type

num

The radian number to be converted.

Required

Float

 

Return value

The equivalent of num in degrees

Value Type : Float.

Example :

  1. echo rad2deg(M_PI_4);  

  2. ?>   

Output :

45