Java tutorial
//package com.java2s; public class Main { public static final float epsilon = .001f; public static boolean isEpsilonEquals(float first, float second) { return (Math.abs(first - second) < epsilon); } }