Add rotation function and tests.