hash Code double Eps - Java java.lang

Java examples for java.lang:double

Description

hash Code double Eps

Demo Code


//package com.java2s;

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

    public static int hashCodeEps(double value) {
        return Long.valueOf(Math.round(value / EPSILON)).hashCode();
    }//from   w  w  w  . j  a va2 s  .  c om
}

Related Tutorials