[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Rect's relational operators
At 09:22 28.10.2001 -0800, you wrote:
>as for greater/less than comparisons, they just compare their left edge
>(and secondarily, the top edge). this would make it pretty easy to
>autmatically sort the rects left-to-right. (i dunno if that would really
>be helpful?)
I am not sure. Anyone has any ideas?
I've expected sort of Rect.contains behaviour, i.e. if rectA overlaps
rectB, then rectA > rectB and rectB < rectA. But you cannot use this
semantics for sorting - there are rectangles, which cannot be compared:
when rectA and rectB have empty intersection or one of them only partly
overlaps another, operations greater/less are not defined.
>i'll try to doublecheck why these aren't working. they'll be fixed in the
>next release (no timeframe on that one)
Thanks a lot.
Ludek
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org