Commit 9907c170 authored by Nico Mack's avatar Nico Mack

Added equals with epsilon method

parent 7796fee3
......@@ -84,4 +84,17 @@ public class MathUtils {
return constrained;
}
// ---------------------------------------------------------------------------
/**
* @param first
* @param second
* @param epsilon
* @return
*/
// ---------------------------------------------------------------------------
public static boolean equals(double first, double second, double epsilon) {
return (Math.abs(second - first) <= epsilon);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment