public void BarelyHorisontalIntersecting() { Box2d b1 = new Box2d(0, 0, 0, 1, -1, 1, 0); Box2d b2 = new Box2d(0.9, 0, 0, 1, -1, 1, 0); Assert.IsTrue(b1.Intersects(b2)); }
public void TwoVerticalNonIntersectingBoxes() { Box2d b1 = new Box2d(0, 0, -1, 1, -1, 1, 0); Box2d b2 = new Box2d(0, 3, -1, 1, -1, 1, 0); Assert.IsFalse(b1.Intersects(b2)); }
public void ABoxIntersectsItselfForSure() { Box2d box = new Box2d(0, 0, -1, 1, -1, 1, 0); Assert.IsTrue(box.Intersects(box)); }