Here you can find the source of divRoundUp(int a, int b)
public static final int divRoundUp(int a, int b)
//package com.java2s; //License from project: Open Source License public class Main { public static final int divRoundUp(int a, int b) { if (b > a) { return 1; }/* w w w . j av a2 s . com*/ int result = a % b; return result == 0 ? a / b : (a - result) / b + 1; } }