数字处理
1.double 的向上,向下,四舍五入,以及转为 int
1.向输出上取整
public static void mathCeil() { |
输出:
number:5.3 |
2.向下取整
public static void mathFloor () { |
输出:
number:5.9 |
3.四舍五入
public static void mathRound() { |
输出:
number1:5.9 |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment