Java Integer Divide divCeil(int a, int b)

Here you can find the source of divCeil(int a, int b)

Description

div Ceil

License

Open Source License

Declaration

public static int divCeil(int a, int b) 

Method Source Code

//package com.java2s;

public class Main {
    public static int divCeil(int a, int b) {
        if (b < 0)
            return divCeil(-a, -b);
        else if (b > 0) {
            if (a >= 0)
                return ((a + b - 1) / b);
            else//  w  ww.  j  a  va  2s .  c  o m
                return a / b;
        } else
            assert (b == 0);
        return Integer.MIN_VALUE;
    }
}

Related

  1. div(int a, int b)
  2. div(int a, int b)
  3. div(int dividend, int divisor)
  4. div(int val, int coe)
  5. divce(long size, long divider, int i)
  6. divCeil(int a, int b)
  7. divCeil(int a, int b)
  8. divCeil(int nNumerator, int nDenominator)
  9. divCeil(int pNum, int pDivisor)