Package org.mapfish.print
Class FloatingPointUtil
java.lang.Object
org.mapfish.print.FloatingPointUtil
Util class to test equality of floating points.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
equals
(double d1, double d2) Check the equality of two doubles taking into consideration the precision issue of floating point arithmetic in Java.static boolean
equals
(float f1, float f2) Check the equality of two floats taking into consideration the precision issue of floating point arithmetic in Java.
-
Method Details
-
equals
public static boolean equals(float f1, float f2) Check the equality of two floats taking into consideration the precision issue of floating point arithmetic in Java.- Parameters:
f1
- Float 1.f2
- Float 2.
-
equals
public static boolean equals(double d1, double d2) Check the equality of two doubles taking into consideration the precision issue of floating point arithmetic in Java.- Parameters:
d1
- Double 1.d2
- Double 2.
-