Syntax error rad2deg() function in PHP

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
Updated on: 2019-12-27T07:02:47+05:30

77 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements