Description
The Python3 radians() method converts angles to radians.
The relationship between angles and radians is: 2π radians = 360°.Thus 1°≈0.0174533 radians, and 1 radian ≈57.29578°.
1) The formula for converting an angle to a radian: radian=angle÷180×π
2) The formula for converting radians to angles: Angle = radians × 180÷π
Syntax
The following is the syntax of the radians() method:
import math
math.radians(x)
Note: radians() cannot be accessed directly, you need to import the math module, and then call this method through the math static object.
Parameters
x -- an angle value, the default unit is angle °.
Return value
Returns an angle in radians.
Instance
The following shows an example of using the radians() method:
The output result after running the above example is: