💾rect.cell(i, j)

  // 🔸 rect.cell(i, j)
  cell(i, j){
    let row = this.row + i - 1;
    let col = this.col + j - 1;
    if (row < 0) throw new Error(`⛔ RangeRect.cell(): new rect can't start from row = ${row}`);
    if (col < 0) throw new Error(`⛔ RangeRect.cell(): new rect can't start from col = ${col}`);
    return new RangeRect(row, col, 1, 1);
  }

Last updated