PHP rad2deg()Functions

PHP Math 参考手册PHP Math Reference Manual

Examples

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 an angle value to a radian value, seedeg2rad()the function.


Syntax

rad2deg(number);

Parameters Description
number Required. Specifies the radian value to convert.

Technical Details

Return value: numberThe corresponding angle.
Return type: Float
PHP Version: 4+


PHP Math 参考手册PHP Math Reference Manual Other Extensions