How to test equality with a tolerance in Swift Testing

So I can see from the documentation that XCTAssertEqual(x, y) becomes #expect(x == y), but what about XCTAssertEqual(x, y, accuracy: 0.2)?

Does something already exist or do we need to write a more involved statement to see if x is less than y plus z and more than y minus z?

How to test equality with a tolerance in Swift Testing
 
 
Q