code: public static boolean isCloseToIntegral(final double value, final double tolerance) {
      return Math.abs(value - Math.round(value)) <= tolerance;
    }
docs: Is {@code value} within {@code tolerance} of being an integer?