Radians to Degrees
Thursday July 2, 2009
In PHP you can convert angles measured in radians to degrees using the Rad2Deg () PHP Function. Here is an example that shows that 1/2 PI radians is equal to 90 degrees:
echo(rad2deg(M_PI_2);This returns the result: 90


Now, i’m not sure about this as i haven’t tested it, but wouldn’t your code generate a syntax error?
I believe the correct code would be echo(rad2deg(M_PI_2));
or
echo rad2deg(M_PI_2);
Isn’t there any quotation need to use?
like
echo “rad2deg(M PI 2)”;
Normally it would be:
echo function(”value”);
but not here, se http://nl.php.net/rad2deg