deg2rad()
Published Jul 10, 2023
Contribute to Docs
The deg2rad()
function converts a number in degrees to the radian equivalent.
Syntax
$result = deg2rad(n);
Where n
is the number in degrees to be converted to the radian equivalent.
The result returns a value type of float
.
Example
Using deg2rad()
to convert degrees to radians:
<?phpecho deg2rad(90);?>
This example results in the following output:
1.5707963267949
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.