Here you can find the source of ceilInt(Double d, double intv)
public static Double ceilInt(Double d, double intv)
//package com.java2s; //License from project: LGPL public class Main { public static Double ceilInt(Double d, double intv) { return floorInt(d, intv) + intv; }/*from w w w. j a va 2 s .c o m*/ public static Double floorInt(Double d, double intv) { if (d < 0) { d -= intv * 0.9999999; } d = d / intv; d = d < 0 ? Math.ceil(d - 0.0000000000001) : Math.floor(d + 0.0000000000001); return d * intv; } }