minAspectRatioSurroundingSize

Determine the minimum size of rectangle with a given aspect ratio (X/Y) that a specified area can fit inside.

For example, if the aspect ratio is 1/2 and the area is 1x1, the resulting rectangle would be size 1x2 and look like this:

 ____
|____|
| |
|____|
|____|