PHP - Number: Converting Between Degrees and RadiansTag: number. degree, radian Category: PHP Basicpost: 16 Mar 2008 read: 157 PHP Number Tips - Part 16: If you want to convert an angle measurement from degrees to radians or vice versa, so you only have to use PHP's rad2deg( ) and deg2rad( ) functions such as:
The formula to convert an angle measurement in degrees (D) to radians (R) is D = R*180/pi. Fortunately, PHP comes with a function to do it for you automatically: the deg2rad( ) function or if you have a value that is already in radians, you can convert it to degrees with the rad2reg( ) function. |
| | Give Your Opinion | Recommend |
|

