PHP deg2rad() Function Example

PHP deg2rad() Function Example


Posted in : PHP Posted on : January 28, 2011 at 6:35 PM Comments : [ 0 ]

Using deg2rad() function, we are convert a degree to its corresponding radian number.

PHP deg2rad() Function Example:

Using deg2rad() function, we are convert a degree to its corresponding radian number. This function converts the number in degrees to the equivalent radian.

Syntax:

deg2rad(degree_number)

degree_number is number and passed as argument in this function.

Example:

<?php
$return = deg2rad(180);
echo "The value of deg2rad(180) is : " . $return . "<br />";

$return_value = deg2rad(90);
echo "The value of deg2rad(90) is : " . $return_value;
?>

Output:

The value of deg2rad(180) is : 3.1415926535898
The value of deg2rad(90) is : 1.5707963267949

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics