A creative and easy way to rotate a 2d matrix of any size and shape (90 degree clockwise)

1. swap x axis to y axis
2. loop in reverse through new x axis