import math


def line_angle(p1, p2):
    """
        Return the angle of the line that goes from p1 to p2
            Clockwise in pygame window
            Counter clockwise in xy-space
    """
    angle = math.atan2((p1[1]-p2[1]), (p1[0]-p2[0])) * 180.0/math.pi
    return (angle + 360) % 360