public class MathUtils
extends java.lang.Object
| Constructor and Description |
|---|
MathUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
roundUpToNearestMultiple(int numberToRound,
int toMultipleOfThis)
Rounds the one number up to the nearest multiple of another
|
static int |
roundUpToNearestMultipleOfPowerOfTwo(int numberToRound,
int aPowerOfTwo)
Rounds the one number up to the nearest multiple of another, where the second number is a power of two.
|
public static int roundUpToNearestMultiple(int numberToRound,
int toMultipleOfThis)
numberToRound - number to roundtoMultipleOfThis - the result will be divisible by this numberpublic static int roundUpToNearestMultipleOfPowerOfTwo(int numberToRound,
int aPowerOfTwo)
numberToRound - number to roundaPowerOfTwo - the result will be divisible by this