title | type | tags | cover | dateModified | |
---|---|---|---|---|---|
Degrees to radians |
snippet |
|
digital-nomad-6 |
2020-11-02 19:27:53 +0200 |
Converts an angle from degrees to radians.
- Use
math.pi
and the degrees to radians formula to convert the angle from degrees to radians.
from math import pi
def degrees_to_rads(deg):
return (deg * pi) / 180.0
degrees_to_rads(180) # ~3.1416