Java Number Equal areEquals(double p, double q)

Here you can find the source of areEquals(double p, double q)

Description

are Equals

License

Open Source License

Declaration

public static boolean areEquals(double p, double q) 

Method Source Code

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

public class Main {
    public static final double APPROX = 0.000001;

    public static boolean areEquals(double p, double q) {
        return p > q - APPROX && p < q + APPROX;
    }//from  w  w w  . j av  a 2 s .  c om
}

Related

  1. areEqual(int i, int j)
  2. areEqual(int o1, int o2)
  3. areEqual(T s1, T s2)
  4. areEqual(T... elements)
  5. areEquals(boolean first, boolean second)