Android examples for java.lang:Float
Floats Equal
//package com.java2s; public class Main { /**/*from w w w.ja v a 2 s. c om*/ * @return true iff |f1 - f2| <= epsilon */ public static boolean FloatsEqual(float epsilon, float f1, float f2) { return (Math.abs(f1 - f2) <= epsilon); } }