Finished generic matrix rotation