PHP rad2deg() - Math Functions
What is rad2deg Function?
How to convert radians number into degrees in PHP?
Explanation
The "rad2deg()" function converts the radians number to the equivalent number in degrees.
Syntax:
rad2deg(x)
In the above syntax "x" is the radian number to be converted to degrees.
Example :
<?php
$n =3.14;
$degree = rad2deg($n);
print "The value of $n in degrees is $degree";
?>
Result :
The value of 3.14 in degrees is 179.908747671
In the above example the value of "M_PI=3.14159265359" is equivalent to 180 degree.