Java Abs abs(double value)

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

Description

Absolute Value alternative to MathHelper#abs(float par0) for Double values

License

LGPL

Declaration

public static double abs(double value) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    /**//from ww  w. j  a  va  2s .co m
     * Absolute Value alternative to {@link MathHelper#abs(float par0)} for Double values
     */
    public static double abs(double value) {
        if (value < 0) {
            return 0f;
        } else {
            return value;
        }
    }
}

Related

  1. abs(double n)
  2. abs(double number)
  3. abs(double number)
  4. abs(double self)
  5. abs(double value)
  6. abs(double value)
  7. abs(double x)
  8. abs(double x)
  9. abs(double x)