Package org.github.jamm.utils
Class MathUtils
java.lang.Object
org.github.jamm.utils.MathUtils
-
Method Summary
-
Method Details
-
roundTo
public static long roundTo(long x, int m) Rounds x up to the next multiple of m.- Parameters:
x
- the number to roundm
- the multiple (must be a power of 2)- Returns:
- the rounded value of x up to the next multiple of m.
-
roundTo
public static int roundTo(int x, int m) Rounds x up to the next multiple of m.- Parameters:
x
- the number to roundm
- the multiple (must be a power of 2)- Returns:
- the rounded value of x up to the next multiple of m.
-