MCPcopy
hub / github.com/yeemachine/kalidokit / multiply

Method multiply

src/utils/vector.ts:60–63  ·  view source on GitHub ↗

* Multiplies a vector or a number to a vector. * @param {Vector | number} a: Vector or number to multiply * @param {Vector} b: Vector to multiply

(v: Vector | number)

Source from the content-addressed store, hash-verified

58 * @param {Vector} b: Vector to multiply
59 */
60 multiply(v: Vector | number) {
61 if (v instanceof Vector) return new Vector(this.x * v.x, this.y * v.y, this.z * v.z);
62 else return new Vector(this.x * v, this.y * v, this.z * v);
63 }
64 /**
65 * Divide this vector by a vector or a number.
66 * @param {Vector | number} a: Vector or number to divide

Callers 1

lerpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected