Function matrixTranspose

  • This function transposes a matrix, i.e. turns its rows to columns and its columns to rows

    Example

    const matrix = new Matrix([0, 9, 3, 0,
    9, 8, 0, 8,
    1, 8, 5, 3,
    0, 0, 5, 8], 4, 4)
    Array.from(matrixTranspose(matrix)))
    -> [0, 9, 1, 0,
    9, 8, 8, 0,
    3, 0, 5, 5,
    0, 8, 3, 8]

    Parameters

    • matrix: Matrix

      matrix to transpose

    Returns Matrix

Generated using TypeDoc