How to switch Height and Width of rectangle?

Hi,
Cannot find a quick fix for this. I want to toggle/swap rectangle width and height but the press of a button. (without having to change connections).
Any help? thanks

Switch X-Y

The gene pool can be switched to a Boolean Toggle as well.Switch X-Y altr

You can also use this