title: Max square size for unknown number inside rectangle
body: <p>If I have a set of tiles (squares) which can be any number and they are to fill a container (rectangle) of an unknown size how do I work out the maximum size of the tiles without having any of them overlap.</p>
  
  <p>So if I have 2 tiles and the rectangle is 100 * 100 then the max tile size is 50 * 50.  This would also be the max size of tile if there was 3 or 4 tiles for this size of rectanlgle, which just so happens to be a square in this example.</p>
  
  <p>If the rectanlge was 100 * 30 and I had 2 tiles, the max size of the square would be 30 * 30, if I have 4 tiles the max size would be 25 * 25.</p>
  
  <p>How can I do this programatically without hogging the processor by going through every possible combination.</p>
  
  <hr>
  
  <p>I try to summarise a bit better, 
  I have a:</p>
  
  <p>rectangle/bounding box that I need to fill as much as possible without the tiles overlapping.</p>
  
  <p>I know the height and width of the rectangle (but this can change during runtime).</p>
  
  <p>I have X number of tiles (this can change at run time), these are squares.</p>
  
  <p>None of the tiles should overlap, what is the maximum size that each tile can be.  They are all to be the same size.</p>