operational_graphics/toolboxes/scripts/CanvasAreaGRG.py
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"
        """
        import math
        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
Rotate an xy cooordinate about a specified origin

        x,y      xy coordinates
        xc,yc   center of rotation
        angle   angle
        units    "DEGREES" (default) or "RADIANS"
        
Rotate an xy cooordinate about a specified origin
x,y      xy coordinates
xc,yc   center of rotation
angle   angle
units    "DEGREES" (default) or "RADIANS"
Rotate an xy cooordinate about a specified origin x y xy coordinates xc yc center of rotation angle angle units " DEGREES " ( default ) or " RADIANS "
def RotateXY(x, y, xc=0, yc=0, angle=0, units="DEGREES"):
        import math
        x = x - xc
        y = y - yc
        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
def RotateXY ( x , y , xc = 0 , yc = 0 , angle = 0 , units = "DEGREES" ) : import math x = x - xc y = y - yc 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
Rotate an xy cooordinate about a specified origin
x,y      xy coordinates
xc,yc   center of rotation
angle   angle
units    "DEGREES" (default) or "RADIANS"
Rotate an xy cooordinate about a specified origin x y xy coordinates xc yc center of rotation angle angle units " DEGREES " ( default ) or " RADIANS "
"""Rotate an xy cooordinate about a specified origin

        x,y      xy coordinates
        xc,yc   center of rotation
        angle   angle
        units    "DEGREES" (default) or "RADIANS"
        """ # make angle clockwise (like Rotate_management)
x
y
xc
yc
angle
units