更新过期的方法

This commit is contained in:
wrui 2019-06-14 15:20:02 +08:00
parent 7511ffa153
commit 3496523289
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();
}
}