Java Float Number Equal floatEqual(float a, float b, float epsilon)

Here you can find the source of floatEqual(float a, float b, float epsilon)

Description

float Equal

License

Open Source License

Declaration

public static boolean floatEqual(float a, float b, float epsilon) 

Method Source Code

//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);
    }
}

Related

  1. areFloatsEqual(float f1, float f2)
  2. areFloatsEqual(float f1, float f2)
  3. areFloatsEqual(Float one, Float two)
  4. equal(float val1, float val2)
  5. equals(float f1, float f2)
  6. floatEqual(float f1, float f2)
  7. floatEquals(float a, float b)
  8. floatEquals(float x, float y)