import math


def rotatePoint(centerPoint,point,angle):
    """
    Rotates a point around another centerPoint. Angle is in degrees.
    Rotation is counter-clockwise.

        parameters:
            centerPoint : 2d point to rotate point around it.
            point: 2d point to be rotated.
            angle: the float rotation angle to rotate the polygon 
        
        returns:
            rotated point

    """
    angle = math.radians(angle)
    temp_point = point[0]-centerPoint[0] , point[1]-centerPoint[1]
    temp_point = ( temp_point[0]*math.cos(angle)-temp_point[1]*math.sin(angle) , temp_point[0]*math.sin(angle)+temp_point[1]*math.cos(angle))
    temp_point = int(temp_point[0]+centerPoint[0]) , int(temp_point[1]+centerPoint[1])
    return temp_point