MCPcopy Index your code
hub / github.com/processing/p5.js / multiplyVec3

Method multiplyVec3

src/math/Matrices/Matrix.js:1601–1609  ·  view source on GitHub ↗

* Takes a vector and returns the vector resulting from multiplying. This function is only for 3x3 matrices. * that vector by this matrix from the left. * * This method applies the current 3x3 matrix to a given vector, effectively * transforming the vector using the matrix. The resulting

(multVector, target)

Source from the content-addressed store, hash-verified

1599 * }
1600 */
1601 multiplyVec3(multVector, target) {
1602 if (target === undefined) {
1603 target = multVector.copy();
1604 }
1605 target.x = this.row(0).dot(multVector);
1606 target.y = this.row(1).dot(multVector);
1607 target.z = this.row(2).dot(multVector);
1608 return target;
1609 }
1610
1611 // ====================
1612 // PRIVATE

Callers

nothing calls this directly

Calls 3

rowMethod · 0.95
dotMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected