added a test for moving polygon, removed prints

This commit is contained in:
Fraser Graham
2013-11-26 08:41:42 -08:00
parent 5a41b2eea9
commit 9f5fcf5543
2 changed files with 18 additions and 2 deletions
-2
View File
@@ -1,7 +1,6 @@
package govector
import (
"fmt"
"math"
)
@@ -158,7 +157,6 @@ func PolyPolyIntersection(p1 Polygon2d, v1 Vector2d, p2 Polygon2d) (bool, bool,
if interval_distance < minimum_interval_distance {
minimum_interval_distance = interval_distance
translation = axis
fmt.Printf(" AXIS: %v %v\n", axis, interval_distance)
if p1.Origin.Sub(p2.Origin).Dot(axis) < 0 {
translation = translation.Scale(-1)
}