* This function is only for 3x3 matrices A function that returns a row vector of a NxN matrix. * * This method extracts a specific row from the matrix and returns it as a `p5.Vector`. * The row is determined by the `columnIndex` parameter, which specifies the column * index of the matrix
(columnIndex)
| 412 | * } |
| 413 | */ |
| 414 | row(columnIndex) { |
| 415 | const columnVector = []; |
| 416 | for (let i = 0; i < this.#sqDimention; i++) { |
| 417 | columnVector.push(this.matrix[i * this.#sqDimention + columnIndex]); |
| 418 | } |
| 419 | return new Vector(...columnVector); |
| 420 | } |
| 421 | |
| 422 | /** |
| 423 | * A function that returns a column vector of a NxN matrix. |
no test coverage detected