« Return to Thread: intersecting rects

intersecting rects

by jostM-2 :: Rate this Message:

Reply to Author | View in Thread

Hi,

how can I determin if two rects intersect?

the docs say that:


sect(aRect)
& aRect

"returns a new Rect which is the intersection of the receiver and aRect."

-------

however if two rects don't intersect, I still get a (negative) rect:

a=Rect(0,0,50,50);
b=Rect(75,75,75,75);


b.sect(a)

however, this returns Rect(75, 75, -25, -25)

is this a bug?


jostM

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

 « Return to Thread: intersecting rects

LightInTheBox - Buy quality products at wholesale price