package com.ecep.contract.util;

/**
 * 数字工具类
 */
public class NumberUtils {
    /**
     * 判断两个double是否相等
     *
     * @param a a
     * @param b b
     * @return boolean
     */
    public static boolean equals(double a, double b) {
        return Math.abs(a - b) < 0.01;
    }

    public static boolean equals(float a, float b) {
        return Math.abs(a - b) < 0.01;
    }
}
