p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

Slight mistake in description of scale() effect in reference

Open Nuclear-Crow opened this issue 1 year ago • 3 comments

Increasing access

This issue pertains to the reference for one of the functions. A clearer reference helps with accessibility for everyone.

Most appropriate sub-area of p5.js?

  • [ ] Accessibility
  • [ ] Color
  • [X] Core/Environment/Rendering
  • [ ] Data
  • [ ] DOM
  • [ ] Events
  • [ ] Image
  • [ ] IO
  • [ ] Math
  • [ ] Typography
  • [ ] Utilities
  • [ ] WebGL
  • [ ] Build process
  • [ ] Unit testing
  • [ ] Internationalization
  • [ ] Friendly errors
  • [ ] Other (specify if possible)

Feature enhancement details

The reference page for the scale() function contains the following:

By default, transformations accumulate. For example, calling scale(1) twice has the same effect as calling scale(2) once. The push() and pop() functions can be used to isolate transformations within distinct drawing groups.

This is incorrect, as calling scale(1) twice does nothing, since a coefficient of 1 does not change the scale. To provide a correct and clear example, the following can be written instead:

[...] For example, calling scale(2) twice has the same effect as calling scale(4) once.

Nuclear-Crow avatar Jul 09 '24 16:07 Nuclear-Crow

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!

welcome[bot] avatar Jul 09 '24 16:07 welcome[bot]

Thanks @Nuclear-Crow! Tagging @nickmcintyre to take a look

Qianqianye avatar Jul 09 '24 20:07 Qianqianye

Good catch @Nuclear-Crow!

nickmcintyre avatar Jul 10 '24 16:07 nickmcintyre