Finish matrix rotation code.