10
I find the TransposeFrame library useful. I mostly use it for swapping two windows, as per this question; but it provides more general functionality than just that.
Follow the link to see ascii diagrams of the various transformations.