Compare two float values with Float.floatToIntBits
public class Util{ static public boolean areEqual(float aThis, float aThat){ //System.out.println("float"); return Float.floatToIntBits(aThis) == Float.floatToIntBits(aThat); } }