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 wi
x = max(rectHeight/numberOfSquares, rectangleLength/numberOfSquares)
if x <= retangleHeight && x <= rectangleLength then
squareSideLength = x
else
squareSideLength = min(rectangleHeight, rectangleLength)