MathUtil(数学工具类)

/**
     * 格式化数字 保留两位
     * @param n
     * @return
     */
    public static float format2Bit(float n){
        return (float)(Math.round(n*100))/100;
    }
原文地址:https://www.cnblogs.com/429lirui/p/13694730.html