MCPcopy
hub / github.com/processing/p5.js / row

Method row

src/math/Matrices/Matrix.js:414–420  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 4

multiplyVecMethod · 0.95
multiplyVec3Method · 0.95
p5.Matrix.jsFile · 0.45
slerpMethod · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected