List of utility methods to do floor
long | floorToLong(float pX) floor To Long return pX > 0 ? (long) pX : (long) pX - 1; |
long | floorToNearestNumberDivisibleByFour(long number) floor To Nearest Number Divisible By Four return number & ~(0x3);
|
int | floorToPowerofTwo(int i) floor To Powerof Two int r = 1; for (int c = 1; c <= i; c *= 2) { r = c; return r; |
int | floorTs(long timestamp, int aggregationWindow) floor Ts return (int) (timestamp / (1000 * aggregationWindow)) * aggregationWindow; |
double | floory(double a, double precision) Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal for at least a precision value.
return Math.floor(a / precision) * precision;
|