def get_angle(origin, endpoint): """ Returns the angle created by the line from origin to endpoint """ dx = endpoint.x - origin.x dy = endpoint.y - origin.y return math.degrees(math.atan2(dy, dx))