Class MathUtils
java.lang.Object
dk.jonaslindstrom.ruffini.common.util.MathUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intstatic intceilLog2(int n) static intfloorLog2(int n) static booleanisPowerOfTwo(int n) static intnextPowerOfTwo(int n) static intproduct(int... factors)
-
Constructor Details
-
MathUtils
public MathUtils()
-
-
Method Details
-
product
public static int product(int... factors) -
nextPowerOfTwo
public static int nextPowerOfTwo(int n) -
isPowerOfTwo
public static boolean isPowerOfTwo(int n) -
floorLog2
public static int floorLog2(int n) -
bigLog2
-
ceilLog2
public static int ceilLog2(int n) -
binaryExpansion
-