title: Fit N rectangles within area keeping aspect ratio
body: <p>I have N rectangles, all of the same dimensions <strong>rectWidth</strong>*<strong>rectHeight</strong>.
  I have an area with dimensions <strong>areaWidth</strong>*<strong>areaHeight</strong>.
  I want to fit the N rectangles within the area keeping the aspect ratio of the rectangles, resizing the rectangles to make them fit.
  Between the rectangles I want a spacing of <strong>space</strong>.</p>
  
  <p>What should be the dimensions of the rectangles to fit them all within the rectangle and keeping the aspect ratio?</p>