Latest web development tutorials

PHP rad2deg () function

PHP Math Reference PHP Math Reference

Examples

The converted angle in radians:

<?php
echo rad2deg(pi()) . "<br>";
echo rad2deg(pi()/4);
?>

Running instance »

Definition and Usage

rad2deg () function to convert radians angle value.

Tip: For the angle value to radians, please see deg2rad () function.


grammar

rad2deg( number );

参数 描述
number 必需。规定要转换的弧度值。

technical details

return value: number corresponding to the angle.
Return type: Float
PHP version: 4+


PHP Math Reference PHP Math Reference