rad2deg() function in PHP


The rad2deg() function converts radian value to degree value. It Returns the equivalent of radia value val in degrees.

Syntax

rad2deg(val)

Parameters

  • val − The radian value to be converted into degree.

Return

The rad2deg() function Returns the equivalent of val in degrees.

Example

 Live Demo

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

Output

180

Example

Let us see another example −

 Live Demo

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

Output

90

Example

Let us see another example −

 Live Demo

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

Output

22.5

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 27-Dec-2019

39 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements