Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP rad2deg() Function

PHP rad2deg() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Convert radians to degrees:

"; echo rad2deg(pi()/4); ?>

Run Example »


Definition and Usage

The rad2deg() function converts a radian value to a degree value.

**Tip:** To convert degrees to radians, see deg2rad() function in Vue 3.


Syntax

rad2deg(

number

);

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

Technical Details

Return Value: number The corresponding degree value.
Return Type: Float
PHP Version: 4+

PHP Math Reference Manual PHP Math Reference Manual