Java Utililty Methods Number Difference

List of utility methods to do Number Difference

Description

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

Method

doubledifference(double m1, double M1, double m2, double M2)
difference
if (M1 <= m2)
    return m2 - M1;
if (M2 <= m1)
    return m1 - M2;
return 0;
floatdifference(float x, float y)
difference
return Math.abs(x - y);
intdifference(int start, int boundary)
difference
return ((boundary + 1) - (start & boundary)) & boundary;
intdifference(Integer value1, Integer value2)
difference
return value1 - value2;
intdifferenceModulo(int a, int b, int c)
difference Modulo
return mod(mod(a, c) - mod(b, c), c);