This commit is contained in:
sm
2014-01-07 22:29:53 -08:00
parent 30aee4f09f
commit c4932922d8
2 changed files with 50 additions and 18 deletions
+1
View File
@@ -19,6 +19,7 @@ func RectRectIntersection(r1 AABB2d, r2 AABB2d) bool {
r1.A.Y < r2.B.Y && r1.B.Y > r2.A.Y)
}
// returns collision, inside, point of collision
func RectIntersection(r AABB2d, p Point2d, v Vector2d) (bool, bool, Point2d) {
collision := false
inside := false