fix comment

This commit is contained in:
Josh Deprez 2021-09-08 17:09:11 +10:00
parent 94915072f0
commit 1af3e141fb

View file

@ -113,7 +113,7 @@ func polygonRectOverlap(polygon []image.Point, rect image.Rectangle) bool {
// Since rect is an axis-aligned rectangle, we only need vertical and // Since rect is an axis-aligned rectangle, we only need vertical and
// horizontal line intersection tests. // horizontal line intersection tests.
// Walk each edge of polygon. Only a point and the ∆x, ∆y are needed. // Walk each edge of polygon.
for i, p := range polygon { for i, p := range polygon {
q := polygon[(i+1)%len(polygon)] q := polygon[(i+1)%len(polygon)]
d := q.Sub(p) d := q.Sub(p)