Here you can find the source of roundUP(double d)
public static int roundUP(double d)
//package com.java2s; //License from project: Open Source License public class Main { public static int roundUP(double d) { double dAbs = Math.abs(d); int i = (int) dAbs; double result = dAbs - (double) i; if (result == 0.0) { return (int) d; } else {/*from w w w . ja v a2 s.c o m*/ return (int) d < 0 ? -(i + 1) : i + 1; } } }