Here you can find the source of abs(double number)
Parameter | Description |
---|---|
number | a parameter |
public static double abs(double number)
//package com.java2s; //License from project: LGPL public class Main { /**// www .ja v a2 s . c o m * abs * @param number * @return abs value */ public static double abs(double number) { return (number <= 0.0D) ? 0.0D - number : number; } }