MCPcopy Create free account
hub / github.com/melonjs/melonJS / dot

Method dot

packages/melonjs/src/math/vector3d.ts:338–340  ·  view source on GitHub ↗

* return the dot product of this vector and the passed one * @param v other vector * @returns The dot product.

(v: Vector2d | Vector3d)

Source from the content-addressed store, hash-verified

336 * @returns The dot product.
337 */
338 dot(v: Vector2d | Vector3d) {
339 return this.x * v.x + this.y * v.y + this.z * ("z" in v ? v.z : this.z);
340 }
341
342 /**
343 * calculate the cross product of this vector and the passed one

Callers 12

length2Method · 0.95
angleMethod · 0.95
projectMethod · 0.95
projectNMethod · 0.95
flattenPointsOnFunction · 0.45
isSeparatingAxisFunction · 0.45
vornoiRegionFunction · 0.45
testPolygonEllipseFunction · 0.45
vector2d.spec.tsFile · 0.45
vector3d.spec.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected