Here you can find the source of ceil(float floatNumber)
public static int ceil(float floatNumber)
//package com.java2s; //License from project: Open Source License public class Main { public static int ceil(float floatNumber) { int truncated = (int) floatNumber; return floatNumber > truncated ? truncated + 1 : truncated; }//from w ww. j a v a 2 s.co m }