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

intceil(float f)
Rounds the given number up to an int.
return (int) (f + (1f - f % 1f));
intceil(float floatNumber)
ceil
int truncated = (int) floatNumber;
return floatNumber > truncated ? truncated + 1 : truncated;
intceil(float pX)
ceil
return pX > 0 ? (int) pX + 1 : (int) pX;
intceil(float value)
ceil
int i = (int) value;
return value > i ? i + 1 : i;
intceil(float value)
Returns the smallest integer greater than or equal to the specified float.
return (int) (value + BIG_ENOUGH_CEIL) - BIG_ENOUGH_INT;
intceil(float x)
ceil
int res = (int) x;
if (res == x) {
    return res;
} else if (x >= 0) {
    return res + 1;
} else {
    return res - 1;
intceil(float x)
ceil
return (int) (x + BIG_ENOUGH_CEIL) - BIG_ENOUGH_INT;
intceil(float x)
ceil
return (int) (Math.ceil(x) + (x > 0 ? 0.5f : -0.5f));
intceil(int a, int b)
Return ceiling of integer division
return (a % b == 0 ? a / b : a / b + 1);
intceil(int dividend, int divisor)
Ceiling of integer division
return ((dividend + divisor) - 1) / divisor;