def rotate90(x: int, y: int, dir='Clockwise') -> tuple:
    """
    This rotates a 2d vector 90 degrees either clockwise or anti-clockwise
       >>> rotate90(2, 1)
       (1, -2)
       >>> rotate90(2,1,'Anti')
       (-1, 2)
       >>>
    """

    if dir == 'Clockwise':
        return y, -x
    else:
        return -y, x