Package com.sk89q.worldguard.util
Class MathUtils
java.lang.Object
com.sk89q.worldguard.util.MathUtils
Math-related utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
checkedMultiply
(long a, long b) Returns the product ofa
andb
, provided it does not overflow.
-
Method Details
-
checkedMultiply
public static long checkedMultiply(long a, long b) Returns the product ofa
andb
, provided it does not overflow.Borrowed from Google Guava since Bukkit uses an old version.
- Throws:
ArithmeticException
- ifa * b
overflows in signedlong
arithmetic
-