#NEWLINE# def angle_between( l1 , l2 ) : #NEWLINE# #INDENT# 'The angle formed between the two linear entities.\n\n        Parameters\n        ==========\n\n        l1 : LinearEntity\n        l2 : LinearEntity\n\n        Returns\n        =======\n\n        angle : angle in radians\n\n        Notes\n        =====\n\n        From the dot product of vectors v1 and v2 it is known that:\n\n            ``dot(v1, v2) = |v1|*|v2|*cos(A)``\n\n        where A is the angle formed between the two vectors. We can\n        get the directional vectors of the two lines and readily\n        find the angle between the two using the above formula.\n\n        See Also\n        ========\n\n        is_perpendicular\n\n        Examples\n        ========\n\n        >>> from sympy import Point, Line\n        >>> p1, p2, p3 = Point(0, 0), Point(0, 4), Point(2, 0)\n        >>> l1, l2 = Line(p1, p2), Line(p1, p3)\n        >>> l1.angle_between(l2)\n        pi/2\n\n        ' #NEWLINE# v1 = ( l1 . p2 - l1 . p1 ) #NEWLINE# v2 = ( l1 . p2 - l2 . p1 ) #NEWLINE# return acos ( ( v1 . dot ( v2 ) / ( abs ( v1 ) * abs ( v2 ) ) ) )