package com.huimv.common.utils;

import java.math.BigDecimal;

/**
 * <p>
 *
 * </p>
 *
 * @author yinhao
 * @date 2021/7/6 11:01
 */
public class MathUtil {

    public static double formatDecimalNumber(double inNum, int n) {
        BigDecimal b = new BigDecimal(inNum);
        return b.setScale(n, BigDecimal.ROUND_HALF_UP).doubleValue();
    }
}
