Bugfix in Rect.Intersects()

This commit is contained in:
Noah 2021-10-09 21:33:13 -07:00
parent ebcb54ad47
commit 16fbb28ace

View File

@ -51,6 +51,7 @@ func (r Rect) Intersects(other Rect) bool {
NewPoint(b.X, b.Y+b.H),
NewPoint(b.X+b.W, b.Y),
NewPoint(b.X+b.W, b.Y+b.H),
NewPoint(b.X+b.W/2, b.Y+b.H/2), // midpoint
}
for _, pt := range corners {
if pt.Inside(a) {