* Takes a vector and returns the vector resulting from multiplying to that vector by this matrix from left. This function is only for 3x3 matrices. * * This method applies the current 3x3 matrix to a given vector, effectively * transforming the vector using the matrix. The resulting vector
(multVector, target)
| 592 | * } |
| 593 | */ |
| 594 | multiplyVec(multVector, target) { |
| 595 | if (target === undefined) { |
| 596 | target = multVector.copy(); |
| 597 | } |
| 598 | for (let i = 0; i < this.#sqDimention; i++) { |
| 599 | target.values[i] = this.row(i).dot(multVector); |
| 600 | } |
| 601 | return target; |
| 602 | } |
| 603 | |
| 604 | /** |
| 605 | * Inverts a given matrix. |
no test coverage detected