How to use deg2rad in PHP
This article describe about deg2rad() Function in PHP.
deg2rad() Function
For convert degree to its radian number use deg2rad() function.
Syntax
Parameter |
Description |
degree_number |
define the degree to convert |
Example 1
<html>
<body>
<?php
echo deg2rad("60") . "<br />";
echo deg2rad("20") . "<br />";
echo deg2rad("399") . "<br />";
echo deg2rad("55");
?>
</body>
</html> |
Output

Example 2
<html>
<body>
<?php
$deg = 360;
$rad = deg2rad($deg);
echo "$deg degrees is equal to $rad radians";
?>
</body>
</html> |
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here