Here you can find the source of abs(double d1)
public static double abs(double d1)
//package com.java2s; //License from project: Open Source License public class Main { public static double abs(double d1) { return d1 < 0d ? -d1 : d1; }/* w ww . j a v a2 s.co m*/ public static int abs(int d1) { return d1 < 0 ? -d1 : d1; } }