* Transposes the given matrix `a` based on the square dimension of the matrix. * * This method rearranges the elements of the matrix such that the rows become columns * and the columns become rows. It handles matrices of different dimensions (4x4, 3x3, NxN) * by delegating to specific tr
(a)
| 489 | * } |
| 490 | */ |
| 491 | transpose(a) { |
| 492 | if (this.#sqDimention === 4) { |
| 493 | return this.#transpose4x4(a); |
| 494 | } else if (this.#sqDimention === 3) { |
| 495 | return this.#transpose3x3(a); |
| 496 | } else { |
| 497 | return this.#transposeNxN(a); |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | /** |
| 502 | * Multiplies the current matrix with another matrix or matrix-like array. |
no test coverage detected