1. Computing & Technology

Discuss in my forum

Rad2Deg () PHP Function

By , About.com Guide

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

©2012 About.com. All rights reserved.

A part of The New York Times Company.