Here you can find the source of abs(float value)
public static float abs(float value)
//package com.java2s; //License from project: LGPL public class Main { public static float abs(float value) { return value >= 0.0F ? value : -value; }//from w w w .jav a 2 s . c o m /** * Returns the unsigned value of an int. */ public static int abs(int value) { return value >= 0 ? value : -value; } }