1. Home
  2. Computing & Technology
  3. PHP / MySQL

Rad2Deg () PHP Function

By Angela Bradley, About.com

Definition: The Rad2Deg PHP Function is used to convert an angle measured in radians to one measured in degrees. It is written as rad2deg (X) where X is the measurement in radians. It will then return the equivalent measurement in degrees.
Also Known As: Radians converted to degrees
Examples:
<?php
echo(rad2deg(M_PI_4) . "<br />");
echo(rad2deg(M_PI_2) . "<br />");
echo(rad2deg(2) . "<br />");
echo(rad2deg(0) . "<br />");
?>
This returns the values:
45
90
114.59155902616
0
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Rad2Deg PHP Function - Radians to Degrees with PHP

©2009 About.com, a part of The New York Times Company.

All rights reserved.