Java Integer Divide divCeil(int pNum, int pDivisor)

Here you can find the source of divCeil(int pNum, int pDivisor)

Description

div Ceil

License

Open Source License

Declaration

public static int divCeil(int pNum, int pDivisor) 

Method Source Code

//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;
    }
}

Related

  1. divce(long size, long divider, int i)
  2. divCeil(int a, int b)
  3. divCeil(int a, int b)
  4. divCeil(int a, int b)
  5. divCeil(int nNumerator, int nDenominator)
  6. divCeil(int value, int divisor)
  7. divData(int numTest, int numTrain)
  8. dividable(final String charBitmap, final int row)
  9. divide(final String bitmap, final int row)