added a test for moving polygon, removed prints
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user