Fix a bug in Rect.__contains_point!

It was comparing point.y with the Rect's min_x.
This commit is contained in:
Eryn Wells 2023-03-10 22:56:50 -08:00
parent 879e0c680d
commit 1018febeab

View file

@ -300,7 +300,7 @@ class Rect:
def __contains_point(self, pt: Point) -> bool:
return (pt.x >= self.min_x and pt.x <= self.max_x
and pt.y >= self.min_x and pt.y <= self.max_y)
and pt.y >= self.min_y and pt.y <= self.max_y)
def __contains_rect(self, other: 'Rect') -> bool:
return (self.min_x <= other.min_x