Update imports
Update imports in rads_to_degrees Update imports and formatting in gcd Update imports in degrees_to_rads Update import in snake
This commit is contained in:
@ -8,13 +8,13 @@ Converts an angle from radians to degrees.
|
||||
Use `math.pi` and the radian to degree formula to convert the angle from radians to degrees.
|
||||
|
||||
```py
|
||||
import math
|
||||
from math import pi
|
||||
|
||||
def rads_to_degrees(rad):
|
||||
return (rad * 180.0) / math.pi
|
||||
```
|
||||
|
||||
```py
|
||||
import math
|
||||
from math import pi
|
||||
rads_to_degrees(math.pi / 2) # 90.0
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user