Here you can find the source of roundToTop(float f)
public static int roundToTop(float f)
//package com.java2s; //License from project: Apache License public class Main { public static int roundToTop(float f) { if (f > (int) f) return (int) (f + 1); return (int) f; }/*from w w w . ja v a2s .co m*/ }