Here you can find the source of abs(double value)
public static double abs(double value)
//package com.java2s; //License from project: LGPL public class Main { /**//from ww w. j a va 2s .co m * Absolute Value alternative to {@link MathHelper#abs(float par0)} for Double values */ public static double abs(double value) { if (value < 0) { return 0f; } else { return value; } } }