w3resource

PHP: rad2deg() function

Description

The rad2deg() function is used to convert a radian number to the equivalent number its degree.

Version:

(PHP 4 and above)

Syntax:

rad2deg(num)

Parameter:

Name Description Required /
Optional
Type
num The radian number to be converted. Required Float

Return value:

The equivalent of num in degrees

Value Type: Float.

Example:

<?php
echo rad2deg(M_PI_4);
?> 

Output:

45

View the example in the browser

See also

PHP Function Reference

Previous: pow
Next: rand



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/php/function-reference/rad2deg.php