Here you can find the source of doubleEquals(double a, double b)
public static boolean doubleEquals(double a, double b)
//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); } }