import math


def RotateXY(x, y, xc=0, yc=0, angle=0, units="DEGREES"):
    """Rotate an xy cooordinate about a specified origin

    x,y      xy coordinates
    xc,yc   center of rotation
    angle   angle
    units    "DEGREES" (default) or "RADIANS"
    """
    x = x - xc
    y = y - yc
    # make angle clockwise (like Rotate_management)
    angle = angle * -1
    if units == "DEGREES": angle = math.radians(angle)
    xr = (x * math.cos(angle)) - (y * math.sin(angle)) + xc
    yr = (x * math.sin(angle)) + (y * math.cos(angle)) + yc
    return xr, yr