deg2rad


php128 apg

CONVERTS any arc given number in degrees to the equivalent radians.

Compatible with LOCALE only, up to PHP 7.4.XX.





This function converts $num expressed in deggres to radians.



<?php

float deg2rad 
float $num )


where,

$num The argument to process in degrees

?>
 

$num


The argument to process in degrees.



  1 EXERCISE   

<table width="100%" border="1" cellspacing="5" 
cellpadding="5"><tr><td colspan="3">deg2rad($arg)</td></tr>
<tr><td>DEGREES (°)</td><td>OPERATION</td><td>RADIANS ( rd )</td></tr>

<?php

// setlocale(LC_ALL, 'pt_PT', 'pt-PT', 'pt');

$degree01 = [ 04590135180225270315360];


foreach(
$degree01 as $val01)

echo 
'<tr><td>' $val01 '</td>';
echo 
'<td>deg2rad( ' $val01 ' )</td>';
echo 
'<td>' deg2rad($val01) . '</td></tr>';

}

?>

<tr><td colspan="3">ed48</td></tr></table>