MCPcopy Create free account
hub / github.com/TheAlgorithms/JavaScript / dotProduct

Method dotProduct

Data-Structures/Vectors/Vector2.js:113–115  ·  view source on GitHub ↗

* Vector dot product * * @param vector The vector used for the multiplication. * @returns The resulting dot product.

(vector)

Source from the content-addressed store, hash-verified

111 * @returns The resulting dot product.
112 */
113 dotProduct(vector) {
114 return this.x * vector.x + this.y * vector.y
115 }
116
117 /**
118 * Vector rotation (see https://en.wikipedia.org/wiki/Rotation_matrix)

Callers 1

Vector2.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected