Java Number Invert invert(float value)

Here you can find the source of invert(float value)

Description

invert

License

BSD License

Declaration

public static float invert(float value) 

Method Source Code

//package com.java2s;
/**//w w  w.j a  v  a  2 s .  co  m
 * @author Christoffer Niska <ChristofferNiska@gmail.com>
 * @license New BSD License http://www.opensource.org/licenses/bsd-license.php
 */

public class Main {
    public static float invert(float value) {
        return value > 0.0f ? -Math.abs(value) : Math.abs(value);
    }
}

Related

  1. invert(double slope)
  2. invert(final double angle)
  3. invert(int numToInvert)
  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)