Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"point" class documentation text misprint #7086

Closed
Paulo005 opened this issue Jun 6, 2024 · 9 comments · Fixed by #7096
Closed

"point" class documentation text misprint #7086

Paulo005 opened this issue Jun 6, 2024 · 9 comments · Fixed by #7096

Comments

@Paulo005
Copy link

Paulo005 commented Jun 6, 2024

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.

@limzykenneth limzykenneth transferred this issue from processing/p5.js-website Jun 6, 2024
Copy link

welcome bot commented Jun 6, 2024

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

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
Copy link
Member

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
Copy link
Author

Paulo005 commented Jun 9, 2024

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
Copy link
Contributor

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

@Paulo005
Copy link
Author

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

@kmr-ankitt
Copy link

can i fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants