Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的计算器上,我输入了 90-sin^-1(Y/X)
Y=6, X=9
我被退回了大约:
48.71 度(我的预期)
但是在java上它返回:
0.72
有人告诉我在 java 上使用 asin... 对吗?
编程语言中的三角函数返回以弧度测量的值。您需要转换为如下所示的度数。
度数=弧度*180/PI
是的,该asin方法是正确的。
asin
结果asin以弧度为单位,因此您需要将其转换为度数:
double angle = 90 - Math.toDegrees(Math.asin(Y / X));