Java Number Invert invert(int numToInvert)

Here you can find the source of invert(int numToInvert)

Description

Inverts a number.

License

Open Source License

Parameter

Parameter Description
numToInvert a parameter

Declaration

public static final int invert(int numToInvert) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from   w w  w .  java  2s  . c  o m*/
     * Inverts a number.
     * @param numToInvert
     * @return
     */
    public static final int invert(int numToInvert) {
        return ~numToInvert + 1;
    }
}

Related

  1. invert(double slope)
  2. invert(final double angle)
  3. invert(float value)
  4. 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)
  5. invertFloat(float n)
  6. invertFloat(float number)
  7. invertNumeral(int base, String number)