Java Abs abs(double z)

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

Description

Returns absolute value of double number.

License

Open Source License

Parameter

Parameter Description
z double number.

Return

int sign.

Declaration

public static double abs(double z) 

Method Source Code

//package com.java2s;

public class Main {
    /** Returns absolute value of double number.
     * @param z double number.//from  w  ww.j  a  v  a2  s . c om
     * @return int sign.
     */
    public static double abs(double z) {
        return (z < 0) ? -z : z;
    }
}

Related

  1. abs(double value)
  2. abs(double value)
  3. abs(double x)
  4. abs(double x)
  5. abs(double x)
  6. abs(double... values)
  7. abs(double[] arr)
  8. abs(double[] array)
  9. abs(double[] da)