DecimalFormat 用的是rounding modes 查了下api UP Rounding mode to round away from zero. DOWN Rounding mode to round towards zero. CEILING Rounding mode to round towards positive infinity. FLOOR Rounding mode to round towards negative infinity. HALF_UP Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up. HALF_DOWN Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. HALF_EVEN Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor.
Rounding Mode
最新推荐文章于 2024-01-27 09:55:08 发布