!102 浮点数运算类更新过期方法

Merge pull request !102 from GeBron/master
pull/102/MERGE
若依 2019-06-13 17:40:36 +08:00 committed by Gitee
commit 58673fa502
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package com.ruoyi.common.utils;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
*
@ -90,7 +91,7 @@ public class Arith
{
return BigDecimal.ZERO.doubleValue();
}
return b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP).doubleValue();
return b1.divide(b2, scale, RoundingMode.HALF_UP).doubleValue();
}
/**
@ -108,6 +109,6 @@ public class Arith
}
BigDecimal b = new BigDecimal(Double.toString(v));
BigDecimal one = new BigDecimal("1");
return b.divide(one, scale, BigDecimal.ROUND_HALF_UP).doubleValue();
return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue();
}
}