Java中Math.round()

首先:它的返回值类型是long。 如果 Math.round(11.5f),那它的返回值类型就是int,这一点可以参考API。 其次 Returns the closest long to the argument, with ties rounding to positive infinity 它返回的是一个最接近参数的long 值 例如: Math.round(11.6) = 12 Math.
相关文章
相关标签/搜索