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

Method scale

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

* Multiply this vector values by the given scalar * @param x x scale value * @param [y] y scale value, if not passed, it uses the x value * @returns Reference to this object for method chaining

(x: number, y = x)

Source from the content-addressed store, hash-verified

164 * @returns Reference to this object for method chaining
165 */
166 scale(x: number, y = x) {
167 return this.set(this.x * x, this.y * y);
168 }
169
170 /**
171 * Convert this vector into isometric coordinate space

Callers 2

projectMethod · 0.95
projectNMethod · 0.95

Calls 1

setMethod · 0.95

Tested by

no test coverage detected