Here you can find the source of doubleEquals(double a, double b)
Parameter | Description |
---|---|
a | double-precision value |
b | double-precision value |
public static boolean doubleEquals(double a, double b)
//package com.java2s; // Licensed under the MIT license. See LICENSE file in the project root for full license information. public class Main { /**/*from w w w. jav a 2 s. c o m*/ * Implements the semantics of {@link Double#equals(Object)} for two * primitive doubles. * * @param a double-precision value * @param b double-precision value * @return true if equal, false if not */ public static boolean doubleEquals(double a, double b) { return Double.doubleToLongBits(a) == Double.doubleToLongBits(b); } }