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

Method sub

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

* Subtract the passed vector from this vector * @param v other vector * @returns Reference to this object for method chaining

(v: Vector2d | Vector3d)

Source from the content-addressed store, hash-verified

73 * @returns Reference to this object for method chaining
74 */
75 sub(v: Vector2d | Vector3d) {
76 return this.set(this.x - v.x, this.y - v.y, this.z - ("z" in v ? v.z : 0));
77 }
78
79 /**
80 * Multiply this vector values by the given scalar

Callers 15

localToWorldMethod · 0.45
worldToLocalMethod · 0.45
isSeparatingAxisFunction · 0.45
testEllipseEllipseFunction · 0.45
testPolygonEllipseFunction · 0.45
dragStartMethod · 0.45
dragMoveMethod · 0.45
clickedMethod · 0.45
pointerMoveMethod · 0.45
recalcMethod · 0.45
drawTileLayerMethod · 0.45

Calls 1

setMethod · 0.95

Tested by

no test coverage detected