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

Function vectorValidation

src/math/patch-vector.js:83–92  ·  view source on GitHub ↗
(p5, fn, lifecycles)

Source from the content-addressed store, hash-verified

81 * pre-conditions are met.
82 */
83export default function vectorValidation(p5, fn, lifecycles){
84
85 p5.registerDecorator('p5.prototype.createVector', _defaultEmptyVector);
86 p5.registerDecorator('p5.Vector.prototype.mult', _validatedVectorOperation(true));
87 p5.registerDecorator('p5.Vector.prototype.rem', _validatedVectorOperation(true));
88 p5.registerDecorator('p5.Vector.prototype.div', _validatedVectorOperation(true));
89 p5.registerDecorator('p5.Vector.prototype.add', _validatedVectorOperation(false));
90 p5.registerDecorator('p5.Vector.prototype.sub', _validatedVectorOperation(false));
91
92}

Callers

nothing calls this directly

Calls 2

registerDecoratorMethod · 0.80

Tested by

no test coverage detected