w3resource logo


PHP rad2deg function

PHP : rad2deg() function

<<PreviousNext>>

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

<<PreviousNext>>

Rate this tutorial


Your Rating: not set

Share this tutorial

RSS Feed