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

Method add

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

Source from the content-addressed store, hash-verified

165 * @returns Reference to this object for method chaining
166 */
167 add(v: Vector2d | Vector3d | ObservableVector3d) {
168 return this.set(this.x + v.x, this.y + v.y, this.z + ("z" in v ? v.z : 0));
169 }
170
171 /**
172 * Subtract the passed vector from this vector

Callers

nothing calls this directly

Calls 1

setMethod · 0.95

Tested by

no test coverage detected