constrain method

CellSize constrain(
  1. CellSize size
)

Implementation

CellSize constrain(CellSize size) =>
    CellSize(constrainWidth(size.cols), constrainHeight(size.rows));