List of utility methods to do floor
int | floor(float x) floor return (int) (Math.floor(x) + 0.5f); |
int | floor(int f) floor if ((f & 0xFFFF) == 0) return f; return (f & ~0xFFFF) + (f < 0 ? 65536 : 0); |
int | floor(int number, int divisor) floor return (number / divisor) * divisor;
|
int | floor(int x, int quantum) Returns maximum possible integer, less or equal than oldValue , divisible by quantum .
int dx = (x > 0) || (x % quantum == 0) ? 0 : -1; return (x / quantum + dx) * quantum; |
double | floor(Integer a) Floor. return Math.floor(a.doubleValue());
|
void | Floor(Object in, int val) Floor if (in == null) return; if (in instanceof int[]) { int[] inn = (int[]) in; for (int i = 0, s = inn.length; i < s; i++) if (inn[i] < val) inn[i] = val; } else { ... |
String | floor(String input) floor Double d = Double.parseDouble(input);
return String.valueOf(Math.floor(d));
|
double | floor10(double a) Returns the largest (closest to positive infinity) double value that is a power of 10 not greater than the argument. return Math.pow(10, Math.floor(log10(a)));
|
int | floor1e5(double coordinate) floore return (int) Math.floor(coordinate * 1e5); |
int | floor2(int a, int preserveDigits) Math#floor(double) -like operation for integers preserving the given number of digits in contrary to MathUtil#floor(int,int) where cut-of-digits are specified: return floor(a, getDigits(a) - preserveDigits)
return floor(a, getDigits(a) - preserveDigits);
|