X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP rad2deg() Function

PHP Math Reference PHP Math Reference

Example

Convert radians to degrees:

<?php
echo rad2deg(pi()) . "<br>";
echo rad2deg(pi()/4);
?>

Run example »

Definition and Usage

The rad2deg() function converts a radian value to a degree value.

Tip: To convert a degree value to a radian value, look at the deg2rad() function.


Syntax

rad2deg(number);

Parameter Description
number Required. Specifies a radian value to convert

Technical Details

Return Value: The equivalent of number in degrees
Return Type: Float
PHP Version: 4+


PHP Math Reference PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook