code: public TolerantFloatComparison isWithin(final float tolerance) {
      return new TolerantFloatComparison() {
        @Override
        public void of(float expected) {
          Float actual = actual();
          checkNotNull(
              actual, "actual value cannot be null. tolerance=%s expected=%s", tolerance, expected);
          checkTolerance(tolerance);
  
          if (!equalWithinTolerance(actual, expected, tolerance)) {
            failWithoutActual(
                fact("expected", floatToString(expected)),
                butWas(),
                fact("outside tolerance", floatToString(tolerance)));
          }
        }
      };
    }
docs: Prepares for a check that the subject is a finite number within the given tolerance of an
  expected value that will be provided in the next call in the fluent chain.
  
  <p>The check will fail if either the subject or the object is {@link Float#POSITIVE_INFINITY},
  {@link Float#NEGATIVE_INFINITY}, or {@link Float#NaN}. To check for those values, use {@link
  #isPositiveInfinity}, {@link #isNegativeInfinity}, {@link #isNaN}, or (with more generality)
  {@link #isEqualTo}.
  
  <p>The check will pass if both values are zero, even if one is {@code 0.0f} and the other is
  {@code -0.0f}. Use {@code #isEqualTo} to assert that a value is exactly {@code 0.0f} or that it
  is exactly {@code -0.0f}.
  
  <p>You can use a tolerance of {@code 0.0f} to assert the exact equality of finite floats, but
  often {@link #isEqualTo} is preferable (note the different behaviours around non-finite values
  and {@code -0.0f}). See the documentation on {@link #isEqualTo} for advice on when exact
  equality assertions are appropriate.
  
  @param tolerance an inclusive upper bound on the difference between the subject and object
  allowed by the check, which must be a non-negative finite value, i.e. not {@link
  Float#NaN}, {@link Float#POSITIVE_INFINITY}, or negative, including {@code -0.0f}