Java Double Number Equal doubleEquals(double a, double b)

Here you can find the source of doubleEquals(double a, double b)

Description

double Equals

License

Open Source License

Declaration

public static boolean doubleEquals(double a, double b) 

Method Source Code

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

public class Main {
    private static final double DEFAULT_EPSILON = 0.0001;

    public static boolean doubleEquals(double a, double b, double epsilon) {
        return Math.abs(a - b) <= epsilon;
    }/*w  w  w  .j a v a2 s. c  om*/

    public static boolean doubleEquals(double a, double b) {
        return doubleEquals(a, b, DEFAULT_EPSILON);
    }
}

Related

  1. doubleEqual(double d1, double d2)
  2. doubleEqual(double d1, double d2, double delta)
  3. doubleEqual(double v1, double v2)
  4. doubleEquality(double v1, double v2, double epsilon)
  5. doubleEquals(double a, double b)
  6. doubleEquals(double a, double b)
  7. doubleEquals(Double d1, Double d2)
  8. doubleEquals(double d1, double d2)
  9. doubleEquals(double d1, double d2, double epsilon)