Easy Tutorial
❮ Func Mysqli Commit Func String Bin2Hex ❯

PHP deg2rad() Function

PHP Math Reference Manual

Example

Convert degrees to radians:


Definition and Usage

The deg2rad() function converts a degree value to a radian value.

Note: To convert a radian value to degrees, see the rad2deg() function.


Syntax

Parameter Description
number Required. Specifies the angle to convert.

Technical Details

Return Value: The radian equivalent of the number.
Return Type: Float
--- ---
PHP Version: 4+
--- ---

More Examples

Example 1

Convert an angle to its corresponding radians:


❮ Func Mysqli Commit Func String Bin2Hex ❯