首页 > 其他 > 详细

ceil中有-0啊

时间:2020-07-07 12:00:26      阅读:55      评论:0      收藏:0      [点我收藏+]
 
 
技术分享图片

 

 

 
这里主要是有一点:
1
Math.ceil(d1) 
ceil 方法上有这么一段注释:If the argument value is less than zero but greater than -1.0, then the result is negative zero
如果参数小于0且大于-1.0,结果为 -0
1
Math.floor(d1)
ceil 和 floor 方法 上都有一句话:If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as  the argument,意思为:如果参数是 NaN、无穷、正 0、负 0,那么结果与参数相同,
如果是 -0.0,那么其结果是 -0.0

ceil中有-0啊

原文:https://www.cnblogs.com/albertshine/p/13259857.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!