(self, p1, p2)
clockwise angle between two points in degrees
clockwise angle between two points in degrees
clockwise angle between two points in degrees
def angle_between(self, p1, p2):
        '''
        clockwise angle between two points in degrees
        '''
        if HAVE_CV2:
            ang1 = np.arctan2(*p1[::-1])
            ang2 = np.arctan2(*p2[::-1])
            return np.rad2deg((ang1 - ang2) % (2 * np.pi))
        else:
            side1=math.sqrt(((p1[0] - p2[0]) ** 2))
            side2=math.sqrt(((p1[1] - p2[1]) ** 2))
            return math.degrees(math.atan(side2/side1))
def angle_between ( self , p1 , p2 ) : if HAVE_CV2 : ang1 = np . arctan2 ( * p1 [ : : - 1 ] ) ang2 = np . arctan2 ( * p2 [ : : - 1 ] ) return np . rad2deg ( ( ang1 - ang2 ) % ( 2 * np . pi ) ) else : side1 = math . sqrt ( ( ( p1 [ 0 ] - p2 [ 0 ] ) ** 2 ) ) side2 = math . sqrt ( ( ( p1 [ 1 ] - p2 [ 1 ] ) ** 2 ) ) return math . degrees ( math . atan ( side2 / side1 ) )