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

Method copy

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

* Copy the components of the given vector into this one * @param v other vector * @returns Reference to this object for method chaining

(v: Vector2d | Vector3d | ObservableVector3d)

Source from the content-addressed store, hash-verified

336 * @returns Reference to this object for method chaining
337 */
338 copy(v: Vector2d | Vector3d | ObservableVector3d) {
339 return this.set(v.x, v.y, "z" in v ? v.z : 0);
340 }
341
342 /**
343 * return true if this vector is equal to the given values or vector

Callers

nothing calls this directly

Calls 1

setMethod · 0.95

Tested by

no test coverage detected