描述
radians() 方法将角度转换为弧度。
adians() 方法的语法:
import math
print ("radians(3) : ", math.radians(3))
print ("radians(-3) : ", math.radians(-3))
print ("radians(0) : ", math.radians(0))
print ("radians(math.pi) : ", math.radians(math.pi))
print ("radians(math.pi/2) : ", math.radians(math.pi/2))
print ("radians(math.pi/4) : ", math.radians(math.pi/4))
以上实例运行后输出结果为:
radians(3) : 0.05235987755982989
radians(-3) : -0.05235987755982989
radians(0) : 0.0
radians(math.pi) : 0.05483113556160755
radians(math.pi/2) : 0.027415567780803774
radians(math.pi/4) : 0.013707783890401887