|
|
PHP rad2deg() - Math Functions
|
Tutorials » Php »
|
Topic |
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.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|