Skip to content

Commit

Permalink
Merge pull request #7024 from bobbykaz/issue-7023-vector-sub-document…
Browse files Browse the repository at this point in the history
…ation-fix

Fix 'p5.Vector.sub()' documentation mistakenly referencing 'add'ing
  • Loading branch information
limzykenneth authored May 8, 2024
2 parents d18386e + f48e8a3 commit b11b613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math/p5.Vector.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ p5.Vector = class {
* of numbers, as in `v.sub([1, 2, 3])`.
*
* If a value isn't provided for a component, it won't change. For
* example, `v.sub(4, 5)` adds 4 to `v.x`, 5 to `v.y`, and 0 to `v.z`.
* example, `v.sub(4, 5)` subtracts 4 from `v.x`, 5 from `v.y`, and 0 from `v.z`.
* Calling `sub()` with no arguments, as in `v.sub()`, has no effect.
*
* The static version of `sub()`, as in `p5.Vector.sub(v2, v1)`, returns a new
Expand Down

0 comments on commit b11b613

Please sign in to comment.