English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

The rad in PHP2The deg() Function

rad2The deg() function converts the radian value to a degree value. It returns the equivalent radius value val (in degrees).

Syntax

rad2deg(val)

Parameter

  • val-To convert the radian value to degrees.

Returns

rad2The deg() function returns the equivalent value of val (in degrees).

Example

<?php
   echo rad2deg(pi());
?>

Output Result

180

Example

Let's look at another example-

<?php
   echo rad2deg(pi())/2);
?>

Output Result

90

Example

Let's look at another example-

<?php
   echo rad2deg(pi())/8);
?>

Output Result

22.5