def distance_to_line(self, line): """Compute the distance to a line. Parameters ---------- line : line The line. Returns ------- float The distance. """ return distance_point_line(self, line)
def is_point_on_line(point, line, tol=0.0): """Verify if a point lies on a line. Parameters ---------- point (sequence of float): XYZ coordinates. line (tuple): Two points defining a line. tol (float): Optional. A tolerance. Default is ``0.0``. Returns ------- bool ``True`` if the point is in on the line. ``False`` otherwise. """ return distance_point_line(point, line) <= tol
def is_point_on_line(point, line, tol=0.0): """Determine if a point lies on a line. Parameters ---------- point : sequence of float XYZ coordinates. line : tuple Two points defining a line. tol : float, optional A tolerance. Default is ``0.0``. Returns ------- bool ``True`` if the point is in on the line. ``False`` otherwise. """ return distance_point_line(point, line) <= tol