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 :
<?php echo rad2deg(M_PI_4); ?>
Output :
45
View the example in the browser
See also

