Pu Zhibing
2025-02-10 b9a9d7dbe0ff19813877fb9d6a0533d22ed228ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.dsh.competition.util;
 
import java.math.BigDecimal;
 
/**
 * Double文档
 */
public class DoubleUtil {
 
    public static Double format(Double num) {
        BigDecimal b = new BigDecimal(num);
        num = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
        return num;
    }
 
}