免费礼包无法领取
parent
44f3df5fcf
commit
3e1f2e1787
|
@ -403,9 +403,15 @@ public class MathUtils {
|
||||||
return Double.parseDouble(Float.toString(f));
|
return Double.parseDouble(Float.toString(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param d1
|
||||||
|
* @param d2 美元 测单位分
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static boolean doubleEquals(double d1 ,double d2){
|
public static boolean doubleEquals(double d1 ,double d2){
|
||||||
BigDecimal data1 = new BigDecimal(d1);
|
BigDecimal data1 = new BigDecimal(d1);
|
||||||
BigDecimal data2 = new BigDecimal(d2);
|
BigDecimal data2 = new BigDecimal(d2);
|
||||||
return data1.compareTo(data2)==0;
|
return data1.compareTo(data2.multiply(new BigDecimal(10000)))!=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue