takeColumns
Selects the first n
columns from each row in a 2D list of Rectangle
objects.
Return
A new 2D list containing the first n
columns from each row of the original list.
Parameters
n
The number of columns to select from each row. If a row has fewer than n
elements, all elements of that row are returned.