import math


def rotate(v1, angle):
    """
    rotates the vector by an angle around the z axis
    :param v1: The vector that will be rotated
    :param angle: The angle to rotate the vector by
    :return: The vector rotated around the z axis by the angle
    """
    x, y, z = v1

    # Rotation transformation
    v = (x*math.cos(angle) - y*math.sin(angle),
         x*math.sin(angle) + y*math.cos(angle),
         z)

    return v