import math


def rotationsmatrix(phi):
    """ rotation matrix. phi is degrees, positive phi rotates CW """
    phi = math.radians(phi)
    return [[math.cos(phi), 1 * math.sin(phi)], [-1 * math.sin(phi), math.cos(phi)]]