def _point_orient(self, point): e1 = edge_of_neighbor(self.n1) e2 = edge_of_neighbor(self.n2) p1 = e1.p1 p2 = e1.p2 p3 = e2.p2 orient1 = orient(p1, p2, point) orient2 = orient(p2, p3, point) orient3 = orient(p3, p1, point) return orient1 + orient2 + orient3
def __contains__(self, point): return orient(self.p1, self.p2, point) == 0