/** * Returns the result of {@link #nearlyEquals(ProjectionPoint, double)}, with {@link Misc#defaultMaxRelativeDiffDouble}. */ default boolean nearlyEquals(ProjectionPoint other) { return nearlyEquals(other, Misc.defaultMaxRelativeDiffDouble); }
/** * Returns {@code true} if this rectangle is nearly equal to {@code other}. The "near equality" of corners is * determined using {@link ProjectionPoint#nearlyEquals(ProjectionPoint, double)}, with the specified maxRelDiff. * * @param other the other rectangle to check. * @param maxRelDiff the maximum {@link Misc#relativeDifference relative difference} that two corners may have. * @return {@code true} if this rectangle is nearly equal to {@code other}. */ public boolean nearlyEquals(ProjectionRect other, double maxRelDiff) { return this.getLowerLeftPoint() .nearlyEquals(other.getLowerLeftPoint(), maxRelDiff) && this.getUpperRightPoint().nearlyEquals(other.getUpperRightPoint(), maxRelDiff); } }