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

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

Description

Returns true if the two doubles are within a small epsilon of each other.

License

Open Source License

Declaration

static public boolean doubleEquals(double a, double b) 

Method Source Code

//package com.java2s;

public class Main {
    static double epsilon = 0.000000001;

    /** Returns true if the two doubles are within a small epsilon of
     * each other.//from   www  .  ja  va2s.c  o m
     **/
    static public boolean doubleEquals(double a, double b) {
        return Math.abs(a - b) < 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)