Here you can find the source of ceil(float pX)
public static int ceil(float pX)
//package com.java2s; public class Main { public static int ceil(float pX) { return pX > 0 ? (int) pX + 1 : (int) pX; }/* w ww . j a va 2 s .c o m*/ }