Java Utililty Methods Divisor

List of utility methods to do Divisor

Description

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

Method

intmaxCommonDivisor(int m, int n)
max Common Divisor
if (m < n) { 
    int temp = m;
    m = n;
    n = temp;
if (m % n == 0) { 
    return n;
return maxCommonDivisor(n, m % n); 
intmaxCommonDivisor(int num1, int num2)
max Common Divisor
return num1 >= num2 ? maxCommonDivisorCore(num1, num2) : maxCommonDivisorCore(num2, num1);
intmaxCommonDivisorCore(int num1, int num2)
max Common Divisor Core
if (num1 % num2 == 0) {
    return num2;
return maxCommonDivisorCore(num2, num1 % num2);
floatmaxDivisibleNumber(float yourDividend, float divisor)
max Divisible Number
return yourDividend + (divisor - (yourDividend % divisor));
intmaxLiteralLengthDivision(int n)
Calculates the division by 31
return n / 31;