* @param {p5.Vector|Number[]} value The vector to add * @chainable
(args)
| 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. |
no test coverage detected