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.08k stars 3.22k forks source link

"point" class documentation text misprint #7086

Closed Paulo005 closed 1 week ago

Paulo005 commented 2 weeks ago

The description text of "point" class p5js documentation contains an error and need to be changed from : "The version of point() with one parameter allows the point's location to be set with its x- and y-coordinates, as in point(10, 20)." to :
"The version of point() with two parameters allows the point's location to be set with its x- and y-coordinates, as in point(10, 20)."

I noticed this error trying to draw a point with one parameter with a p.vector and that didn't work, I think I made no error in my code but it could. For the moment I'll just use the two parameters method.

TY, have a nice day.

welcome[bot] commented 2 weeks 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!

NicholasGillen commented 2 weeks ago

Hi, I'd like to be assigned this issue (as a good first issue to get started). Are you happy if I implement the fix?

Qianqianye commented 2 weeks ago

Thanks @Paulo005 for catching it and @NicholasGillen for your interest. Hi @nickmcintyre, what's your thought on the this before we assign the issue?

yaojiejia commented 2 weeks ago

Hi @Paulo005, I have tested the issue and indeed there is some confusion regarding the documentation, I tested 3 situations that require 1 parameter and 2 parameters: https://editor.p5js.org/AlexJia/sketches/t5uvK0VOS and seems like they all work as expected. I think we can just simply change the documentation from "The version of point() with one parameter allows the point's location to be set with its x- and y-coordinates, as in point(10, 20)." to : "The version of point() with two parameters allows the point's location to be set with its x- and y-coordinates, as in point(10, 20)." And include another line that specifically addresses the usage of one parameter in the point() class. @Qianqianye If it's possible, I'd like to be assigned for this issue, thanks!

nickmcintyre commented 2 weeks ago

Good catch @Paulo005!

It'd be helpful to replace "one parameter" with "two parameters" as you suggested: The version of point() with two parameters allows the point's location to be set with its x- and y-coordinates, as in point(10, 20).

The one-parameter version could also be clarified a bit: The version of point() with one parameter allows the point's location to be set with a p5.Vector object, as in point(myVector).

That description was placed last because vectors are an advanced topic and it's a less common use case. Reading it again, it seems like we should order the descriptions by the number of parameters 1-2-3. Thoughts?

Paulo005 commented 2 weeks ago

hi @yaojiejia Yes the class seems to work with one parameter, in my code that cleary didnt work but as I was working with a lot of librairies it surely comes from me. In a raw sketch that works well. I think there no bug, just a little misprint in the documentation !

TY for testing it !

Chaitanya1672 commented 1 week ago

@Paulo005 I would like to work on this issue. Could you please tell me where we should make the changes?

Paulo005 commented 1 week ago

Well, as said in my first post in the point class documentation

kmr-ankitt commented 1 week ago

can i fix this issue