PHP rad2deg() Function
Example
Convert radians to degrees:
<?php
echo rad2deg(pi()) . "<br>";
echo rad2deg(pi()/4);
?>
Run example »
Definition and Usage
The rad2deg() function converts a radian value to a degree value.
Tip: To convert a degree value to a radian value, look at the deg2rad() function.
Syntax
rad2deg(number);
Parameter | Description |
---|---|
number | Required. Specifies a radian value to convert |
Technical Details
Return Value: | The equivalent of number in degrees |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
PHP Math Reference