Java Utililty Methods Ceil

List of utility methods to do Ceil

Description

The list of methods to do Ceil are organized into topic(s).

Method

doubleceil(double value, int scale)
Ceil.
double power = Math.pow(10, scale);
return Math.ceil(value * power) / power;
intceil(double Var1)
ceil
return (int) (Var1 + 0.9999D);
intceil(double x)
Rounds up a double to an int
int xi = (int) x;
return x > xi ? xi + 1 : xi;
intceil(double x)
A fast implementation of Math#ceil(double) .
return BIG_ENOUGH_INT - (int) (BIG_ENOUGH_FLOOR - x);
doubleceil(double x, double y)
Truncate x up to the nearest y.
return y * Math.ceil((x + .00001) / y);
double[]ceil(double[] array)
Rounds up each element of a given double array.
double[] out = new double[array.length];
for (int i = 0; i < array.length; i++)
    out[i] = Math.ceil(array[i]);
return out;
intceil(final double num)
ceil
final int floor = (int) num;
return floor == num ? floor : floor + (int) (~Double.doubleToRawLongBits(num) >>> 63);
intceil(final double num)
Round up given number.
final int ceil = (int) num;
return (ceil == num) ? ceil : ((num > 0) ? (ceil + 1) : ceil);
intceil(float f)
ceil
return floor(f) + 1;
intceil(float f)
Returns the first integer that is larger than the given float.
int i = (int) f;
if (i < f)
    i++;
return i;