PHP Math Functions Part 6 - PHP Tutorial 69

Published: 17 November 2019
on channel: ChidresTechTutorials
606
15

Notes for You:: PHP Math Functions Part 6 - PHP Tutorial 69
rad2deg() and deg2rad() PHP Math Functions.
To perform mathematical calculations easily PHP provides various mathematical functions and constants.

deg2rad(angleInDeg: Number):Number
Converts the given angleInDeg to radians
Ex: echo deg2rad(180); // 3.1415926535898


rad2deg (angleInRad: Number):Number
Converts the given angleInRad to degrees
Ex: echo rad2deg(M_PI); // 180

Example Code:
echo M_PI; // 3.1415926535898
echo "<br/>";

echo rad2deg(M_PI); // 180
echo "<br/>";

echo deg2rad(180); // 3.1415926535898
echo "<br/>";

echo deg2rad(90); // 1.5707963267949
echo "<br/>";

echo rad2deg(M_PI/2); // 90
echo "<br/>";

echo deg2rad(360); // 6.2831853071796
echo "<br/>";

echo rad2deg(2 * M_PI); // 360
echo "<br/>";

echo rad2deg(6.2831853071796); // 360
echo "<br/>";

Note:
replace < with less-than symbol.
replace > with greater-than symbol.


=========================================

Follow the link for next video:
PHP Tutorial 70 - PHP Math Functions | sin() Function | cos() Function | atan2() Function
   • PHP Math Functions Part 7 - PHP Tutor...  

Follow the link for previous video:
PHP Tutorial 68 - PHP Math Constants | PHP M_E Constant | PHP M_PI Constant
   • Math Constants M_PI and M_E PHP  - PH...  

=========================================

PHP Tutorials Playlist:-
   • PHP Tutorials  

=========================================
Watch My Other Useful Tutorials:-

MySQL Tutorials Playlist:-
   • MySQL Tutorials  

HTML Tutorials Playlist:-
   • HTML Tutorials  

CSS Tutorials Playlist:-
   • CSS Tutorials  

JavaScript Tutorials Playlist:-
   • JavaScript Tutorials  

=========================================

Subscribe to our YouTube channel:
   / chidrestechtutorials  

Visit our Website:
https://www.chidrestechtutorials.com

=========================================
Hash Tags:
#PHP #PHPTutorial #ChidresTechTutorials


On this page of the site you can watch the video online PHP Math Functions Part 6 - PHP Tutorial 69 with a duration of hours minute second in good quality, which was uploaded by the user ChidresTechTutorials 17 November 2019, share the link with friends and acquaintances, this video has already been watched 606 times on youtube and it was liked by 15 viewers. Enjoy your viewing!