【发布时间】:2012-10-27 12:23:11
【问题描述】:
Math.cos() 方法有点问题。我知道,在使用Math.cos() 之前,我必须将角度转换为弧度。但如果我这样做:
System.out.println(Math.cos(Math.toRadians(90));
输出:6.123233995736766E-17
Math.sin() 运行良好。
【问题讨论】:
-
System.out.println(Math.round(Math.cos(Math.toRadians(90)));
标签: java math angle trigonometry