MCPcopy
hub / github.com/processing/p5.js / add

Method add

src/math/p5.Vector.js:530–539  ·  view source on GitHub ↗

* @param {p5.Vector|Number[]} value The vector to add * @chainable

(args)

Source from the content-addressed store, hash-verified

528 * @chainable
529 */
530 add(args) {
531 const minDimension = prioritizeSmallerDimension(this.dimensions, args);
532 shrinkToDimension(this.values, minDimension);
533
534 for (let i = 0; i < this.values.length; i++) {
535 this.values[i] += args[i];
536 }
537
538 return this;
539 }
540
541 /**
542 * Performs modulo (remainder) division with a vector's components.

Callers 15

averagePoleNormalsMethod · 0.95
registerConstantUsageFunction · 0.45
removeDuplicateOverloadsFunction · 0.45
processDataFunction · 0.45
typescript.mjsFile · 0.45
generateTypeDefinitionsFunction · 0.45
p5.sound.min.jsFile · 0.45
p5.sound.jsFile · 0.45
drawFunction · 0.45
setupSceneFunction · 0.45
constructorMethod · 0.45

Calls 5

_friendlyErrorMethod · 0.95
shrinkToDimensionFunction · 0.85
copyMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected