1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

Rad2Deg () PHP Function

By

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
Related Video
Basic PHP Syntax
Using PHP With HTML
  1. About.com
  2. Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Rad2Deg PHP Function - Radians to Degrees with PHP

©2014 About.com. All rights reserved.