The deg2rad()
function in PHP converts a value in degrees to an equal value in radians.
Figure 1 below shows the mathematical representation of the deg2rad()
function.
float deg2rad(number)
The deg2rad()
function takes a
The deg2rad()
function converts the degree value sent as a parameter to a value in radians.
<?php#180echo("deg2rad(180): ");echo (deg2rad(180));echo(" Radians");?><?php#0echo("deg2rad(0): ");echo (deg2rad(0));echo(" Radians");?><?php#-180echo("deg2rad(-180): ");echo (deg2rad(-180));echo(" Radians");?>