(self, o)
return abs(factor_terms(o.y - y))/sqrt(1 + m**2)
Finds the shortest distance between a line and a point.

        Raises
        ======

        NotImplementedError is raised if o is not a Point

        Examples
        ========

        >>> from sympy import Point, Line
        >>> p1, p2 = Point(0, 0), Point(1, 1)
        >>> s = Line(p1, p2)
        >>> s.distance(Point(-1, 1))
        sqrt(2)
Finds the shortest distance between a line and a point.
Finds the shortest distance between a line and a point .
def distance(self, o):
        """
        Finds the shortest distance between a line and a point.

        Raises
        ======

        NotImplementedError is raised if o is not a Point

        Examples
        ========

        >>> from sympy import Point, Line
        >>> p1, p2 = Point(0, 0), Point(1, 1)
        >>> s = Line(p1, p2)
        >>> s.distance(Point(-1, 1))
        sqrt(2)
        """
        if not isinstance(o, Point):
            raise NotImplementedError
        a, b, c = self.coefficients
        if 0 in (a, b):
            return self.perpendicular_segment(o).length
        m = self.slope
        x = o.x
        y = m*x - c/b
        return abs(factor_terms(o.y - y))/sqrt(1 + m**2)
def distance ( self , o ) : if not isinstance ( o , Point ) : raise NotImplementedError a , b , c = self . coefficients if 0 in ( a , b ) : return self . perpendicular_segment ( o ) . length m = self . slope x = o . x y = m * x - c / b return abs ( factor_terms ( o . y - y ) ) / sqrt ( 1 + m ** 2 )