Java Abs abs(double number)

Here you can find the source of abs(double number)

Description

Returns the absolute value

License

Open Source License

Declaration

public static double abs(double number) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*  w w w.  j a va2 s .  co  m*/
     * Returns the absolute value
     */
    public static int abs(int number) {
        return number < 0 ? -number : number;
    }

    /**
     * Returns the absolute value
     */
    public static float abs(float number) {
        return number < 0.0F ? -number : number;
    }

    /**
     * Returns the absolute value
     */
    public static double abs(double number) {
        return number < 0.0D ? -number : number;
    }
}

Related

  1. abs(Double a)
  2. abs(Double d)
  3. abs(double d)
  4. abs(double d1)
  5. abs(double n)
  6. abs(double number)
  7. abs(double self)
  8. abs(double value)
  9. abs(double value)