Here you can find the source of epsilonEquals(float f1, float f2, float epsilon)
public static boolean epsilonEquals(float f1, float f2, float epsilon)
//package com.java2s; /**/*from www. ja v a 2 s .c o m*/ * Legend of Rogue * An AHS Gaming Production * (c) 2013 Jami Couch * fbcouch 'at' gmail 'dot' com * Licensed under Apache 2.0 * See www.ahsgaming.com for more info * * LibGDX * (c) 2011 see LibGDX authors file * Licensed under Apache 2.0 * * Pixelated Fonts by Kenney, Inc. Licensed as CC-SA. * See http://kenney.nl for more info. * * All other art assets (c) 2013 Jami Couch, licensed CC-BY-SA */ public class Main { public static boolean epsilonEquals(float f1, float f2, float epsilon) { return (f1 + epsilon >= f2 && f1 - epsilon <= f2); } }