Java Utililty Methods Number Invert

List of utility methods to do Number Invert

Description

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

Method

doubleinvert(double slope)
invert
return Math.pow(slope, -1);
doubleinvert(final double angle)
invert
return angle + (RAD_FULL / 2.);
floatinvert(float value)
invert
return value > 0.0f ? -Math.abs(value) : Math.abs(value);
intinvert(int numToInvert)
Inverts a number.
return ~numToInvert + 1;
double[]invert3x3(final double m00, final double m01, final double m02, final double m10, final double m11, final double m12, final double m20, final double m21, final double m22)
Invert a 3x3 matrix given as elements in row major order.
final double det = det3x3(m00, m01, m02, m10, m11, m12, m20, m21, m22);
if (det == 0)
    throw new IllegalArgumentException("Matrix not invertible.");
return new double[] { (m11 * m22 - m12 * m21) / det, (m02 * m21 - m01 * m22) / det,
        (m01 * m12 - m02 * m11) / det, (m12 * m20 - m10 * m22) / det, (m00 * m22 - m02 * m20) / det,
        (m02 * m10 - m00 * m12) / det, (m10 * m21 - m11 * m20) / det, (m01 * m20 - m00 * m21) / det,
        (m00 * m11 - m01 * m10) / det };
floatinvertFloat(float n)
invert Float
return (n * -1);
floatinvertFloat(float number)
Inverts a float from positive to negative or negative to positive
return number *= -1;
longinvertNumeral(int base, String number)
invert Numeral
long decimal = 0;
char[] c = number.toCharArray();
for (int i = 0; i < c.length; i++) {
    if ((c[i] >= '\u0030') && (c[i] <= '\u0039')) { 
        decimal = decimal * base + c[i] - '\u0030';
    } else if (c[i] >= '\u0041' && c[i] <= '\u005A') { 
        decimal = decimal * base + c[i] - '\u0041' + 10;
    } else if (c[i] >= '\u0061' && c[i] <= '\u007A') { 
...