//小数点后两位四舍五入 private double formatDouble2(double d) { BigDecimal bigDecimal = new BigDecimal(d); double bg = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); return bg; }
2022-08-03 18:46:05
//小数点后两位四舍五入 private double formatDouble2(double d) { BigDecimal bigDecimal = new BigDecimal(d); double bg = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); return bg; }