From 3b10ab9956325b1b49847c2f109d4009489daa6e Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Wed, 8 Jan 2014 22:15:04 -0800 Subject: [PATCH] removed unreachable code --- collision.go | 5 ----- 1 file changed, 5 deletions(-) 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 {