Here you can find the source of abs(Double d)
Parameter | Description |
---|---|
d | double |
public static double abs(Double d)
//package com.java2s; //License from project: Apache License public class Main { /**/*w ww .j av a 2 s. co m*/ * calculate the absolute value of a double * * @param d double * @return absolute value of d */ public static double abs(Double d) { if (d < 0) { return -1 * d; } else { return d; } } }