import math


def _2d_rotate(position, angle_degrees):
    """rotate a 2d vector around an angle (in degrees)"""
    radians = math.radians(angle_degrees)
    # take the negative of the angle because the orientation circle works clockwise in this world
    cos = math.cos(-radians)
    sin = math.sin(-radians)
    x, y = position
    return x * cos - y * sin, - (x * sin + y * cos)