Doh, ignore my answer.
Its to early in the morning :-D

Best,
Karl

On Tue, Nov 29, 2022 at 6:50 AM karl ramberg <karlramberg@gmail.com> wrote:
Hi,
I think you must use this method with a very similar name

intersects: aRectangle
"Answer whether aRectangle intersects the receiver anywhere."
"Optimized; old code answered:
(origin max: aRectangle origin) < (corner min: aRectangle corner)"

Best,
Karl

On Tue, Nov 29, 2022 at 1:50 AM LawsonEnglish <LEnglish5@cox.net> wrote:
I did this and created 2 small rectangles quite far from each other trying to figure out what the method returns when there is no intersection:

r1 := Rectangle fromUser.
r2 := Rectangle fromUser.

r2 3072@993 corner: 3203@1136
r1 2710@632 corner: 2835@752

r2 intersect: r1 3072@993 corner: 2835@752

r1 intersect: r2  3072@993 corner: 2835@752

Could someone explain these results?

Not in terms of the math involved (I assume that there’s no math bug as the routine was last edited 22 years ago and it is used everywhere in Morphic), but what the LOGIC is for returning what is returned and what it means in the context of the comments:

intersect: aRectangle
        "Answer a Rectangle that is the area in which the receiver overlaps with
        aRectangle…. “

I was trying to figure out how to look to identify when there is no intersection, and that isn’t at all obvious here.

Thanks.


L