def test_line_intercept(self): l1 = Line(Point(0, 0, 0), Point(2, 2, 0)) l2 = Line(Point(2, 0, 0), Point(0, 2, 0)) np.testing.assert_almost_equal(l1.intercepted_by(l2), True) np.testing.assert_almost_equal(l1.get_intercept(l2) == Point(1, 1, 0), True)
def test_line_intercept(self): l1 = Line(Point(0, 0, 0), Point(2, 2, 0)) l2 = Line(Point(2, 0, 0), Point(0, 2, 0)) np.testing.assert_almost_equal(l1.intercepted_by(l2), True) np.testing.assert_almost_equal( l1.get_intercept(l2) == Point(1, 1, 0), True)