๐Ÿ’พ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