diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2022-09-03 01:26:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 19:26:08 +0200 |
commit | 0a079e7603823a025e7574d1cc72d62d6306151d (patch) | |
tree | 1a818bf425be1f1b454a7478e4c8d1c45bfcf4eb /src/main/java/gregtech/api | |
parent | 65865d33ffd2bc32f3d26e9fee5cb38fb6fbadc6 (diff) | |
download | GT5-Unofficial-0a079e7603823a025e7574d1cc72d62d6306151d.tar.gz GT5-Unofficial-0a079e7603823a025e7574d1cc72d62d6306151d.tar.bz2 GT5-Unofficial-0a079e7603823a025e7574d1cc72d62d6306151d.zip |
fix rare occasion of zero sized empty cell in electrolyzer output (#1335)
* fix rare occasion of zero sized empty cell in electrolyzer output
* Spotless apply for branch fix/zero-size-empty-cell for #1335 (#1336)
Co-authored-by: Glease <4586901+Glease@users.noreply.github.com>
Co-authored-by: GitHub GTNH Actions <>
* fix wrong comparator
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Utility.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index abc6366cf3..5898e5fd14 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -4216,6 +4216,14 @@ public class GT_Utility { return val > hi ? hi : val < lo ? lo : val; } + public static int ceilDiv(int lhs, int rhs) { + return (lhs + rhs - 1) / rhs; + } + + public static long ceilDiv(long lhs, long rhs) { + return (lhs + rhs - 1) / rhs; + } + /** * Hash an item stack for the purpose of storing hash across launches */ |