diff --git a/collision.go b/collision.go index b042d0f..3edbbcd 100644 --- a/collision.go +++ b/collision.go @@ -67,7 +67,6 @@ func ProjectPolygon(axis Vector2d, p Polygon2d) (min float32, max float32) { } func PolygonIntersection(r Polygon2d, p Point2d, v Vector2d) (bool, Point2d) { - // TODO - need to test point in polygon for start and end to detect wholly // inside situations intersection := false @@ -75,10 +74,6 @@ func PolygonIntersection(r Polygon2d, p Point2d, v Vector2d) (bool, Point2d) { distance_sq := float32(math.MaxFloat32) for point, _ := range r.Points { - if point == len(r.Points) { - break - } - edgePt, edgeVec := r.Edge(point) i, pt := Intersection(p, edgePt, v, edgeVec) if i {