Using deg2rad() function, we are convert a degree to its corresponding radian number.
PHP deg2rad() Function Example:
Using deg2rad() function, we are convert a degree to its corresponding radian number. This function converts the number in degrees to the equivalent radian.
Syntax:
deg2rad(degree_number)
degree_number is number and passed as argument in this function.
Example:
<?php $return = deg2rad(180); echo "The value of deg2rad(180) is : " . $return . "<br />"; $return_value = deg2rad(90); echo "The value of deg2rad(90) is : " . $return_value; ?>
Output:
The value of deg2rad(180) is : 3.1415926535898 The value of deg2rad(90) is : 1.5707963267949
[ 0 ] Comments