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

Method set

packages/melonjs/src/math/observableVector2d.ts:64–71  ·  view source on GitHub ↗

* Sets the x and y coordinates of the point. * @param x - The new x-coordinate value. * @param y - The new y-coordinate value. * @returns Reference to this object for method chaining.

(x = 0, y = 0)

Source from the content-addressed store, hash-verified

62 * @returns Reference to this object for method chaining.
63 */
64 set(x = 0, y = 0) {
65 this.callBackEnabled = false;
66 this._vector2d.x = x;
67 this._vector2d.y = y;
68 this._callback?.();
69 this.callBackEnabled = true;
70 return this;
71 }
72
73 /**
74 * Sets the x and y coordinates of the point without triggering the callback.

Callers 15

setZeroMethod · 0.95
setVMethod · 0.95
addMethod · 0.95
subMethod · 0.95
scaleMethod · 0.95
toIsoMethod · 0.95
to2dMethod · 0.95
scaleVMethod · 0.95
divMethod · 0.95
absMethod · 0.95
minVMethod · 0.95
maxVMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected