def test_intersect_miss(self): "Check that intersecting outside the edges returns NaNs" plane = Plane(xsize=0.1) rays = Rays([(A + 1, B, -1)], [(0, 0, 1)], None) intersection = plane.intersect(rays) self.assertTrue(all(isnan(intersection[0])))
def test_intersect(self): plane = Plane() rays = Rays([(A, B, -1)], [(0, 0, 1)], None) intersection = plane.intersect(rays) self.assertTrue(allclose(intersection, [(A, B, 0)]))