processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.1k stars 3.22k forks source link

p5.Vector.sub() Reference documentation has a typo in description #7023

Closed bobbykaz closed 1 month ago

bobbykaz commented 1 month ago

Most appropriate sub-area of p5.js?

p5.js version

v1.9.3

Web browser and version

No response

Operating system

No response

Steps to reproduce this

The reference docs for p5.Vector.js sub() method here seem to have copied the exact text from the add() method reference here.

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. Calling sub() with no arguments, as in v.sub(), has no effect.

I think this should instead read:

If a value isn't provided for a component, it won't change. For 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.

welcome[bot] commented 1 month ago

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!

nickmcintyre commented 1 month ago

Good catch @bobbykaz!