rad2deg

double rad2deg(double radians) 

Converts a value in radians to its counterpart in degrees.

Returns:

Floating-point value in degrees

Description:

Returns the number of degrees represented by the radians parameter.

Version:

PHP 3 since 3.0.4, PHP 4

See also:

deg2rad() 

Example:

Convert radians to degrees
$arc_rad = pi() / 2; // pi/2 is one quarter of a circle 
$arc_deg = rad2deg($arc_rad); 
echo "$arc_rad radians is equivalent to $arc_deg degrees"; 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.