Here you can find the source of invert(float value)
public static float invert(float value)
//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); } }