import math


def rotate(vector, angle):
    """Rotate a vector (x, y) by an angle in radians."""
    x, y = vector
    sin, cos = math.sin(angle), math.cos(angle)
    return (
        cos * x - sin * y,
        sin * x + cos * y,
    )