PHP rad2deg()
Published Jun 29, 2023
Contribute to Docs
The rad2deg() function in PHP converts radians to degrees. It accepts a number (radian value) as an input and returns the corresponding number in degrees.
Syntax
rad2deg(number);
Where number is the radian value to convert to degrees. The value returned by the function is a float type and is the equivalent of number in degrees.
Example
A basic example of the rad2deg() function:
<?phpecho rad2deg(1.71);?>
This example results in the following output:
97.975782967371
Codebyte Example
The following example returns the degree value for 0.48 radians.
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn PHP on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours