This commit is contained in:
Looly
2020-06-17 17:54:54 +08:00
parent 01f19daa66
commit 086f3a2e77
2 changed files with 2 additions and 1 deletions

View File

@@ -2114,7 +2114,7 @@ public class NumberUtil {
*/
public static int partValue(int total, int partCount, boolean isPlusOneWhenHasRem) {
int partValue = total / partCount;
if (isPlusOneWhenHasRem && total % partCount == 0) {
if (isPlusOneWhenHasRem && total % partCount > 0) {
partValue++;
}
return partValue;