mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix bug
This commit is contained in:
parent
01f19daa66
commit
086f3a2e77
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
### 新特性
|
### 新特性
|
||||||
### Bug修复
|
### Bug修复
|
||||||
|
* 【core 】 修复NumberUtil.partValue有余数问题(issue#I1KX66@Gitee)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
## 5.3.8 (2020-06-16)
|
## 5.3.8 (2020-06-16)
|
||||||
|
@ -2114,7 +2114,7 @@ public class NumberUtil {
|
|||||||
*/
|
*/
|
||||||
public static int partValue(int total, int partCount, boolean isPlusOneWhenHasRem) {
|
public static int partValue(int total, int partCount, boolean isPlusOneWhenHasRem) {
|
||||||
int partValue = total / partCount;
|
int partValue = total / partCount;
|
||||||
if (isPlusOneWhenHasRem && total % partCount == 0) {
|
if (isPlusOneWhenHasRem && total % partCount > 0) {
|
||||||
partValue++;
|
partValue++;
|
||||||
}
|
}
|
||||||
return partValue;
|
return partValue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user