难以计算Java的罪行定律
在这方面,我正在尝试遵循罪恶法以找到角度A。正确的答案是39.41,但由于某种原因,我没有得到正确的逆正弦值。我该如何解决?
import static java.lang.Math.*;
public class test
{
public static void calculateAzimuth()
{
double a = 90;
double A = 0;
double c = 132.3459;
double C = 111;
// a C c
//sine^-1( 90* ( (sine111) /132.3459)) = A
C = sin(toRadians(C));
A = C/c;
A = (A*a);
A = asin(A);
System.out.println("Angle " + A);
}
}
In this, I'm trying to follow law of sines in order to find angle A. The correct answer for this is 39.41 but for some reason, I'm not getting the correct inverse sine value. How can I fix this?
import static java.lang.Math.*;
public class test
{
public static void calculateAzimuth()
{
double a = 90;
double A = 0;
double c = 132.3459;
double C = 111;
// a C c
//sine^-1( 90* ( (sine111) /132.3459)) = A
C = sin(toRadians(C));
A = C/c;
A = (A*a);
A = asin(A);
System.out.println("Angle " + A);
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不会将A转换为一个程度的值。它仍然在弧度中。
You're not converting A to a value in degrees. It's still in radians.
调用
todegrees
您的结果call
toDegrees
on your result