mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
commit
e7659d6e26
@ -2329,7 +2329,7 @@ public class NumberUtil {
|
|||||||
* @since 3.0.6
|
* @since 3.0.6
|
||||||
*/
|
*/
|
||||||
public static int count(int total, int part) {
|
public static int count(int total, int part) {
|
||||||
return (total % part == 0) ? (total / part) : (total / part + 1);
|
return total == 0 ? 0 : (total - 1) / part + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user