proc calcRowsColumns(rows, columns: int; nPlots: int): (int, int) {....raises: [],
tags: [].}
Calculates the desired rows and columns for # of nPlots given the user's input for rows and columns.- If no input is given, calculate the next possible rectangle of plots that favors columns over rows.
- If either row or column is 0, sets this dimension to 1
- If either row or column is -1, calculate square of nPlots for rows / cols
- If both row and column is -1 or either -1 and the other 0, default back to the next possible square.
Source
Edit