Java Utililty Methods Integer Divide

List of utility methods to do Integer Divide

Description

The list of methods to do Integer Divide are organized into topic(s).

Method

intdivCeil(int pNum, int pDivisor)
div Ceil
boolean sign = pNum > 0 ^ pDivisor > 0;
pNum = Math.abs(pNum);
pDivisor = Math.abs(pDivisor);
return sign ? -pNum / pDivisor : (pNum + pDivisor - 1) / pDivisor;
intdivCeil(int value, int divisor)
div Ceil
int result = value / divisor;
if (value % divisor != 0) {
    result++;
return result;
int[]divData(int numTest, int numTrain)
div Data
int[] select = new int[numTest];
int tem1 = 0;
for (int i = 0; i < numTest; i = i + 2) {
    select[tem1] = i;
    if (tem1 < numTest - 1) {
        select[tem1 + 1] = numTrain + numTest - 1 - i;
        tem1 = tem1 + 2;
    } else {
...
booleandividable(final String charBitmap, final int row)
dividable
return (charBitmap.length() % row) == 0;
String[]divide(final String bitmap, final int row)
divide
final String[] rows = new String[row];
for (int i = 0; i < row; i++) {
    final int start = i * row;
    rows[i] = bitmap.substring(start, start + row);
return rows;
doubledivide(int numerator, int denominator)
divide
return (double) numerator / denominator;
doubledivide(int numerator, int denominator)
divide
return (double) numerator / denominator;
floatdivide(int value, int divideBy)
divide
float result;
Float floatValue = new Float(value);
Float floatDivideBy = new Float(divideBy);
result = floatValue.floatValue() / floatDivideBy.floatValue();
return result;
intdivide(int x, int y)
divide
int z = x / y;
return z < 0 ? z - 1 : z;
voidDivide(Object in, int val)
Divide
if (in == null)
    return;
if (val == 0)
    return;
if (in instanceof int[]) {
    int[] inn = (int[]) in;
    for (int i = 0, s = inn.length; i < s; i++)
        inn[i] /= val;
...