I have a rectangle with more than 800 width and 600 height. It can be 1000 x 600, 2000 x 1000 and etc. I want to scale it to 800 x 600. I want to determine which one matches first, the height or the width and also get the other value that didn't meet first.
| | | |800x600 | | | |inners rec| | | |outer rectangle(1000 x 1000) if I resize which one will hit the boundaries of the inner rectangle left and right or top and bottom.
I used the term square When it should be rectangle.