作者cklonger (22)
看板java
标题Re: [问题] 关於 sin值
时间Fri Jun 6 06:33:27 2008
※ 引述《howard666 (amin)》之铭言:
: 请问一下 java 的 Math.sin(Math.PI)
: 是不是不为0.....
: 好奇怪..............
: 好痛苦 这里搞了我1小时
: 哪位高手救我吧..
http://java.sun.com/j2se/1.4.2/docs/api/
public static double sin(double a)Returns the trigonometric sine of an angle.
Special cases:
If the argument is NaN or an infinity, then the result is NaN.
If the argument is zero, then the result is a zero with the same sign as the
argument.
A result must be within 1 ulp of the correctly rounded result. Results must
be semi-monotonic.
Parameters:
a - an angle, in radians.
Returns:
the sine of the argument.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.166.240.222