deg2rad(): Convert Degree to Radian
X is the number representing angular value in degree.
deg2rad() with round()We can use round() to remove extra decimal places.
deg2rad() with sin() cos()Decimal places Sin(), cos() and other trigonometric functions takes input in radian so while using if we are using data in degree then we have to convert them first and then use with Sin() , Cos() etc.
Let us try few more examples
Plotting of SIN & COS curves by using PHP GD function with deg2rad()
This article is written by plus2net.com team.
![]() |