diff options
Diffstat (limited to 'src/main/java/gregtech/api/util/GT_Utility.java')
-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 */ |