Here you can find the source of divCeil(int pNum, int pDivisor)
public static int divCeil(int pNum, int pDivisor)
//package com.java2s; public class Main { public static int divCeil(int pNum, int pDivisor) { boolean sign = pNum > 0 ^ pDivisor > 0; pNum = Math.abs(pNum);//from w ww . ja v a 2 s . c om pDivisor = Math.abs(pDivisor); return sign ? -pNum / pDivisor : (pNum + pDivisor - 1) / pDivisor; } }