how to rotate matrix scroll by 90 degrees in code

could you look at my code and explain where I would do that though please