List of utility methods to do Number Round
int | roundUp(int n, int nearestMultiple) Round up the given value to given nearest multiple. return n + nearestMultiple - 1 - (n - 1) % nearestMultiple;
|
int | roundUp(int ndigits) round Up return (ndigits + MAX_DIGITS - 1) / MAX_DIGITS;
|
int | roundUp(int num, int divisor) round Up return (num + divisor - 1) / divisor;
|
int | roundUp(int number, int interval) Rounds the first parameter up to the next interval of the second parameter. if (interval == 0) { return 0; } else if (number == 0) { return interval; } else { if (number < 0) { interval *= -1; int i = number % interval; return i == 0 ? number : number + interval - i; |
int | roundUp(int p_154354_0_, int p_154354_1_) round Up if (p_154354_1_ == 0) { return 0; } else if (p_154354_0_ == 0) { return p_154354_1_; } else { if (p_154354_0_ < 0) { p_154354_1_ *= -1; int i = p_154354_0_ % p_154354_1_; return i == 0 ? p_154354_0_ : p_154354_0_ + p_154354_1_ - i; |
int | roundUp(int v, int quant) round Up if ((v % quant) == 0) { return v; } else { return ((v / quant) + 1) * quant; |
int | roundUp(int val, int shift) Rounds an integer up to the nearest multiple of 2^shift . return (val + (1 << shift) - 1) >>> shift << shift; |
int | roundUp(int val, int to) Round the value up to the closest value of to. return (val + 4) / to * to; |
int | roundUp(int x, int blockSizePowerOf2) Round the value up to the next block size. return (x + blockSizePowerOf2 - 1) & (-blockSizePowerOf2);
|
int | roundUp(long n, long m) Round n up to nearest multiple of m. return (int) (((n + m - 1) / m) * m); |