将弧度转换为度数
我注意到将弧度转换为度数,反之亦然,就像将百分比转换为整数,反之亦然。例如,要获得 345 的 60%,您可以执行以下操作
60 * 345/100
将 60 度转换为弧度,您可以执行以下操作。
60 * 3.14/180
那里有一个模式,但是...我们使用 100 来将百分比与数字进行比较。那么,为什么我们使用 180 度而不是 360 度来比较度数和弧度呢?
%100% = 整数 360 度代表整个圆,
使用 180 度就像使用 50% 而不是 100%
我希望我说得有道理。有人能回答吗?谢谢
I noticed that translating radians to degrees and vice versa is like translating a percentage to a whole number and vice versa. For example, to get 60 percent of 345 you do the following
60 * 345/100
to convert 60 degrees to radians you do
60 * 3.14/180
There is a pattern there BUT... we use 100 to compare percentages to a number. So, why do we use 180 degrees instead of 360 degrees to compare degrees to radians?
%100 percent = a whole number
360 degrees represents a whole circle
using 180 degrees is like using 50% instead of 100%
I hope I am making some sense. Can anyone answer? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
使用 180 度而不是 360 度的原因是圆中有
2*pi
弧度,而不是pi
。因此,您将 360 和2*pi
除以 2,得到pi
和180
。The reason you use 180 degrees instead of 360 is that there are
2*pi
radians in a circle, notpi
. Thus you divide both 360 and2*pi
by 2 and getpi
and180
.在 Mathematica 中,我使用方便的预定义
Degree
常量进行转换,其定义为Pi/180
或2 * Pi/360
。圆中有
2 * Pi
弧度的原因是,以弧度表示的角的大小是与它对向的半径为 1 的圆弧的长度。半径为 1 的圆的周长为2 * Pi
。除了提供清晰的几何解释之外,使用弧度还可以使许多其他关系变得更加方便;余弦是正弦的导数,因此正弦和余弦的麦克劳林级数比以度数表示的角度简单得多。In Mathematica, I use the handy predefined
Degree
constant for conversions, which is defined asPi/180
or2 * Pi/360
.The reason there are
2 * Pi
radians in a circle is that the size of an angle in radians is the length of the arc of a circle with radius 1 that subtends it. The circumference of a circle with radius 1 is2 * Pi
. In addition to providing a clear geometrical interpretation, using radians also makes a number of other relations much more convenient; cosine is the derivative of sine, and as a result the Maclaurin series for sines and cosines are much simpler than they would be for angles expressed in degrees.360
度 =2 * Pi
弧度1
度 =Pi / 180
弧度360
degrees =2 * Pi
radians1
degree =Pi / 180
radians我猜你的问题是,为什么一个圆有 360 度(或半圆有 180 度),为什么没有其他更站得住脚的数字,比如 100。
答案是 学位的起源。如果您想使用圆形数字,请查看梯度单位的角度。
PS:SO仅适用于编程问题。这与编程无关。
I guess your question is, why there 360 degrees in a circle (or 180 in a semicircle), and why not some other more tenable number like 100.
The answer to that is the origin of degree. If you'd like to use a round figure, check out the gradian unit of angles.
PS: SO is for programming questions only. This is not programming related.
我问这个问题是因为我在学校注意力不集中。实际上,编程是我问这个问题的原因,因为现在我才真正开始关注。每个编程公式都使用 180 和 PI 来回转换,而不是 360。由于我没有遇到任何示例,因此我认为只有一种方法。当然,如果我读一本普通的数学书,我的理解就会有所不同。
但我现在明白了。 Actionscript 使用 180 度进行顺时针旋转。一旦达到 180,它会使用 -180 回到 0 进行完整旋转。如果你希望你的答案落在 180 度范围内,这就更有意义了。并根据其负值或正值决定它是在 x 轴上向上移动还是在 y 轴上向下移动。尽管我很欣赏这些回答,但我相信这绝对是一个合适的编程问题。对于程序员来说,以度为单位的计算与一般测量员不同。
在现实生活场景中,测量距离始终被视为绝对值,而对其进行编程是错误的。这也解释了为什么我们使用 -180 度。
I ask this question because my lack of paying attention in school. Programming actually is the reason I ask this question because it is now that I am actually paying attention. Every programming formula uses 180 and PI to translate back and forth instead of 360. Since I haven't came across any examples, I assumed that there was only one way. Of course if I was reading a regular math book, I would of known differently.
But I understand now. Actionscript uses 180 degrees for clock wise rotation. once 180 is reached, it uses -180 back down to 0 for a full rotation. Which makes alot more sense if you want your answer to fall in the 180 degree range. and depending on if its negative or positive determines whether or not it is traveling up on the x axis or down and y axis as well. As much as I appreciate the responses, I believe this is absolutely a suitable programming question. For programmers calculating in degrees is different from your average surveyor.
Given a real life scenario, measuring a distance is always considered a absolute value, where programming this is false. which also rationalizes why we use -180 degrees.