Java tutorial
//package com.java2s; //License from project: Apache License public class Main { private final static float EPSILON = 0.00000001F; public static boolean compareFloats(float f1, float f2) { return Math.abs(f1 - f2) <= EPSILON; } }