import math


def rotate2D(x, y, ang):
    """Rotates a 2d vector clockwise by an angle in radians."""
    x2 = x * math.cos(ang) - y * math.sin(ang)
    y2 = y * math.cos(ang) + x * math.sin(ang)
    return x2, y2