removed unreachable code
This commit is contained in:
parent
ab6673d712
commit
3b10ab9956
@ -67,7 +67,6 @@ func ProjectPolygon(axis Vector2d, p Polygon2d) (min float32, max float32) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func PolygonIntersection(r Polygon2d, p Point2d, v Vector2d) (bool, Point2d) {
|
func PolygonIntersection(r Polygon2d, p Point2d, v Vector2d) (bool, Point2d) {
|
||||||
|
|
||||||
// TODO - need to test point in polygon for start and end to detect wholly
|
// TODO - need to test point in polygon for start and end to detect wholly
|
||||||
// inside situations
|
// inside situations
|
||||||
intersection := false
|
intersection := false
|
||||||
@ -75,10 +74,6 @@ func PolygonIntersection(r Polygon2d, p Point2d, v Vector2d) (bool, Point2d) {
|
|||||||
distance_sq := float32(math.MaxFloat32)
|
distance_sq := float32(math.MaxFloat32)
|
||||||
|
|
||||||
for point, _ := range r.Points {
|
for point, _ := range r.Points {
|
||||||
if point == len(r.Points) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
edgePt, edgeVec := r.Edge(point)
|
edgePt, edgeVec := r.Edge(point)
|
||||||
i, pt := Intersection(p, edgePt, v, edgeVec)
|
i, pt := Intersection(p, edgePt, v, edgeVec)
|
||||||
if i {
|
if i {
|
||||||
|
Loading…
Reference in New Issue
Block a user