Python para impacientes

Python como usar o rads_to_degrees

January 04, 2020

Converts an angle from radians to degrees.

Use math.pi and the radian to degree formula to convert the angle from radians to degrees.

from math import pi

def rads_to_degrees(rad):
  return (rad * 180.0) / math.pi
from math import pi
rads_to_degrees(math.pi / 2) # 90.0

Acesse a Referência original 1: Acesse a Referência original 2: