faiface / pixel

A hand-crafted 2D game library in Go
MIT License
4.43k stars 244 forks source link

Fixing #277: Rect.Intersect and Rect.Intersects now have consistent behavior #290

Closed dusk125 closed 2 years ago

dusk125 commented 2 years ago

I updated the Rect.Intersects function to use inclusive operators so that if only the edge of two rectangles is touching, it won't be considered overlapping, like how Intersect works.

I also added some rectangle v rectangle tests, replacing some benchmarks that weren't really doing anything.