Java Float Number Equal floatEquals(float x, float y)

Here you can find the source of floatEquals(float x, float y)

Description

float Equals

License

Apache License

Declaration

public static boolean floatEquals(float x, float y) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static final float DELTA = 0.0000001f;

    public static boolean floatEquals(float x, float y) {
        return Math.abs(x - y) < DELTA;
    }/*from  ww  w .  j  a va 2s. com*/
}

Related

  1. equal(float val1, float val2)
  2. equals(float f1, float f2)
  3. floatEqual(float a, float b, float epsilon)
  4. floatEqual(float f1, float f2)
  5. floatEquals(float a, float b)