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

Method sub

packages/melonjs/src/math/observableVector3d.ts:176–178  ·  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 | ObservableVector3d)

Source from the content-addressed store, hash-verified

174 * @returns Reference to this object for method chaining
175 */
176 sub(v: Vector2d | Vector3d | ObservableVector3d) {
177 return this.set(this.x - v.x, this.y - v.y, this.z - ("z" in v ? v.z : 0));
178 }
179
180 /**
181 * Multiply this vector values by the given scalar

Callers

nothing calls this directly

Calls 1

setMethod · 0.95

Tested by

no test coverage detected