* @param {p5.Vector|Number[]} value the vector to subtract * @chainable
(args)
| 791 | * @chainable |
| 792 | */ |
| 793 | sub(args) { |
| 794 | const minDimension = prioritizeSmallerDimension(this.dimensions, args); |
| 795 | shrinkToDimension(this.values, minDimension); |
| 796 | |
| 797 | for (let i = 0; i < this.values.length; i++) { |
| 798 | this.values[i] -= args[i]; |
| 799 | } |
| 800 | |
| 801 | return this; |
| 802 | } |
| 803 | |
| 804 | /** |
| 805 | * Multiplies a vector's components. |
no test coverage detected