List of utility methods to do floor
int | floorPositive(float value) Returns the largest integer less than or equal to the specified float. return (int) value; |
float | floorPot(float value) floor Pot float returnValue = 0.0f; for (float newValue = 2.0f; newValue < value; newValue *= 2.0f) { returnValue = newValue; return returnValue; |
int | floorPOT(int n) floor POT return ceilMaskPOT(n) + 1 >>> 1;
|
int | floorPowerOf2(final int n) Computes the floor power of 2 within the range [1, 2^30]. if (n <= 1) { return 1; return Integer.highestOneBit(n); |
int | floorPowerOf2(final int x) Rounds down the value to the nearest lower power^2 value. return (int) Math.pow(2, (int) (Math.log(x) / LOG2)); |
int | floorPowerOf2(int n) Computes the floor power of 2 within the range [1, 2^30]. if (n <= 1) { return 1; int f = ceilingPowerOf2(n); if (f <= n) { return f; return f >> 1; ... |
int | floorPowerOfTwo(final int a) floor Power Of Two if (a <= 0) { throw new IllegalArgumentException("a [" + a + "] must be > 0"); return Integer.highestOneBit(a); |
long | floorSec(long milli) floor Sec return (milli / 1000L) * 1000L;
|
long | floorSec(long valueMs) floor Sec return convertToSec(valueMs) * SECOND;
|
int | floorSqrt(long i) floor Sqrt return (int) Math.sqrt(i); |