Here you can find the source of floatEqual(float a, float b, float epsilon)
public static boolean floatEqual(float a, float b, float epsilon)
//package com.java2s; //License from project: Open Source License public class Main { private static float EPSILON = 0.00001f; public static boolean floatEqual(float a, float b, float epsilon) { return (Math.abs(a - b) < epsilon); }/* ww w. ja va2s .co m*/ public static boolean floatEqual(float a, float b) { return (Math.abs(a - b) < EPSILON); } }