From 0a079e7603823a025e7574d1cc72d62d6306151d Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Sat, 3 Sep 2022 01:26:08 +0800 Subject: 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> --- src/main/java/gregtech/api/util/GT_Utility.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/gregtech/api/util') 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 */ -- cgit