math.sin Python · 模块功能
计算正弦值,角度要用弧度。
怎么用
import math math.sin(x)
小例子
import math print(math.sin(math.pi/2))
运行结果
1.0
提醒:先转弧度。
官方文档:https://docs.python.org/zh-cn/3/library/math.html#math.sin
在代码里遇到不认识的词?打开代码点读机,点一下就懂 → ← Python全部词条