Class MathUtils
java.lang.Object
dk.jonaslindstrom.ruffini.common.util.MathUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
static int
ceilLog2
(int n) static int
floorLog2
(int n) static boolean
isPowerOfTwo
(int n) static int
nextPowerOfTwo
(int n) static int
product
(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
-