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

Method add

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

* Add the passed vector to 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

64 * @returns Reference to this object for method chaining
65 */
66 add(v: Vector2d | Vector3d) {
67 return this.set(this.x + v.x, this.y + v.y, this.z + ("z" in v ? v.z : 0));
68 }
69
70 /**
71 * Subtract the passed vector from this vector

Callers

nothing calls this directly

Calls 1

setMethod · 0.95

Tested by

no test coverage detected