def test_inside_rect4b(): offset_x = 1.9 offset_y = 1.9 tr = TestRectangle(-1, -1, 1, -1, 1, 1, -1, 1) tr2 = TestRectangle(-1 + offset_x, -1 + offset_y, 1 + offset_x, -1 + offset_y, 1 + offset_x, 1 + offset_y, -1 + offset_x, 1 + offset_y) r = PSuperCollider.has_rectangle_a_points_inside_rectangle_b(tr, tr2) == True tst(r)
def test_outside_rect4b(): offset_x = -2.01 offset_y = 0.0 tr = TestRectangle(-1, -1, 1, -1, 1, 1, -1, 1) tr2 = TestRectangle(-1 + offset_x, -1 + offset_y, 1 + offset_x, -1 + offset_y, 1 + offset_x, 1 + offset_y, -1 + offset_x, 1 + offset_y) r = PSuperCollider.has_rectangle_a_points_inside_rectangle_b(tr, tr2) == False tst(r)