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

Method multiplyPoint

src/math/Matrices/Matrix.js:1442–1445  ·  view source on GitHub ↗

* Applies a matrix to a vector. The fourth component is set to 1. * Returns a vector consisting of the first * through third components of the result. * * This method multiplies the current matrix by a 4D vector (x, y, z, 1), * effectively transforming the vector using the matrix. The

({ x, y, z })

Source from the content-addressed store, hash-verified

1440 * }
1441 */
1442 multiplyPoint({ x, y, z }) {
1443 const array = this.multiplyVec4(x, y, z, 1);
1444 return new Vector(array[0], array[1], array[2]);
1445 }
1446
1447 /**
1448 * Applies a matrix to a vector.

Callers 2

transformVerticesMethod · 0.45
interactionFunction · 0.45

Calls 1

multiplyVec4Method · 0.95

Tested by

no test coverage detected