Here you can find the source of roundUp(double a)
public static int roundUp(double a)
//package com.java2s; //License from project: GNU General Public License public class Main { /** Returns the closest int to the argument, with ties rounding up. */ public static int roundUp(double a) { return (int) Math.round(a); }// w w w.ja va 2 s . c om /** Returns the closest int to the argument, with ties rounding up. */ public static int roundUp(float a) { return Math.round(a); } }