Function getSingleDimensionIndex

  • Parameters

    • row: number

      Current row number. Rows are zero-indexed; the first row is row 0.

    • column: number

      Current column number. Columns are zero-indexed; the first column is column 0.

    • totalRows: number

      Total number of rows.

    • totalColumns: number

      Total number of columns.

    Returns number | undefined

    The index in a single-dimension structure of the given row and column in a two-dimensional structure.
    If row or column are negative, the function will return undefined.
    If row is greater than or equal to totalRows, the function will return undefined.
    If column is greater than or equal to totalColumns, the function will return undefined.