知识卡片
弧度用整圈比例表示转角
弧度把一整圈记为2π。秒数s对应θ=2πs/60=πs/30,因此0秒为0,15秒为π/2,30秒为π,45秒为3π/2。math.Sin与Cos接收弧度;把度数直接传进去会得到错误方向。原文把约分结果写成2π/30是笔误,实际代码使用π/30。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 数学
原书出处 · 1 处
- 数学 · 查看原书依据
/ 2) * 3}, {simpleTime(0, 0, 7), (math.Pi / 30) * 7}, } for _, c := range cases { t.Run(testName(c.time), func(t *testing.T) { got := secondsInRadian
参考来源
- 位置:《通过测试学习 Go 编程》数学,spine020(book-sources;extracted/通过测试学习 Go 编程/_epub-src/OEBPS/Text/19.html)。
- 结论依据:原文给整圈、三角函数单位及secondsInRadians代码;四例是按该公式演算。
- 原始内容: / 2) * 3}, {simpleTime(0, 0, 7), (math.Pi / 30) * 7}, } for _, c := range cases { t.Run(testName(c.time), func(t *testing.T) { got := secondsInRadian