width: 1920 height: 1080 total pixels: width * height = 2073600 aspect ratio: 1920 / 1080 ~= 1.8
How do I calculate a new resolution (width and height) with the same aspect ratio but a new pixel count? In the other words one that satisifes the following conditions:
width * height = 10000 width / height = 1.8
There are infintely many solutions to that equation system however and I want the solution that most resembles a screen resolution. I suppose that means the solution with the minimum distance abs(widht - height), but I'm not really sure.