Closed kortschak closed 8 years ago
I don't understand. Could you elaborate on what the problem was? This seems to be subtler than I originally realized, so I think the best place to elaborate is in a function comment. Thanks.
Added commentary. PTAL
To be explicit here about the problem, previously rectanglesOverlap did not properly handle the case where the later matrix (b) has a right column that is at the far right of the strided backing slice. This meant it was handled by the wrapped case and caused the overlap to be missed. The comments in the code now should allow you to draw what things will look like (the only way to explain it properly is graphically, which I obviously can't do here).
ping also @vladimir-ch
LGTM, but I'd appreciate a glance from @vladimir-ch given I've already been wrong once about this snippet.
Agreed.
Just four ints and so difficult to reason about. LGTM
Yes. The comments make it much clearer and @btracey 's observation has significantly simplified the test.
Fixes #359.