Here you can find the source of ceil(float value)
static public int ceil(float value)
//package com.java2s; //License from project: Open Source License public class Main { static private final int BIG_ENOUGH_INT = 16 * 1024; static private final double BIG_ENOUGH_CEIL = 16384.999999999996; /** Returns the smallest integer greater than or equal to the specified float. This method will only properly ceil floats from * -(2^14) to (Float.MAX_VALUE - 2^14). */ static public int ceil(float value) { return (int) (value + BIG_ENOUGH_CEIL) - BIG_ENOUGH_INT; }/* www . j a v a 2s .c o m*/ }