package thyyxxk.webserver.utils;

import java.math.BigDecimal;

/**
 * <p>
 * 描述： BigDecimal 判断大小
 * </p>
 *
 * @author xc
 * @date 2021-11-10 08:23
 */
public class BigUtils {

    public static boolean bigDaYu(BigDecimal a, int b) {
        return a.compareTo(new BigDecimal(b)) > 0;
    }

    public static boolean bigXiaoYu(BigDecimal a, int b) {
        return a.compareTo(new BigDecimal(b)) < 0;
    }

    public static boolean dengYu(BigDecimal a, int b) {
        return a.compareTo(new BigDecimal(b)) == 0;
    }

    public static boolean bigDaYu(BigDecimal a, BigDecimal b) {
        return a.compareTo(b) > 0;
    }

    public static boolean bigXiaoYu(BigDecimal a, BigDecimal b) {
        return a.compareTo(b) < 0;
    }

    public static boolean dengYu(BigDecimal a, BigDecimal b) {
        return a.compareTo(b) == 0;
    }
}
