I have a set of columns of varying widths and I need an algorithm to re-size them for some value y which is greater than the sum of all their widths.
I would like the algorithm to prioritize equalizing the widths. So if I have a value that's absolutely huge the columns will end up with more or less the same width. If there isn't enough room for that I want the smaller cells to be given preference.
Any whiz bang ideas? I'd prefer something as simple as:
getNewWidths(NewWidth, ColumnWidths[]) returns NewColumnWidths[]