p5.js
p5.js copied to clipboard
Calculation map() Documentation Enhancement
Increasing access
No
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [ ] Color
- [ ] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [X] Math
- [ ] Typography
- [ ] Utilities
- [ ] WebGL
- [ ] Build process
- [ ] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [X] Other (specify if possible)
- [X] Documentation
- [X] Calculation
Feature enhancement details
I'd like to propose specifying in the documentation that map() preforms a linear mapping: https://p5js.org/reference/p5/map/ I'd also add a recommendation to use manual mappings for different needs.
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!
I have updated the documentation. Please check.
@limzykenneth @ericnlchen @ChihYungChang @bsubbaraman @albertomancia @JazerUCSB @tedkmburu @perminder-17 @Obi-Engine10 @jeanetteandrews
Hi @ronyginosar ! Can you describe a bit more what you have in mind, please? For example, if I as a user want to map a number x using some non-linear function (sin for example), I can use that function directly (sin(x)). The map function is specifically to simplify linear mapping, which is both very common and also a little bit verbose to write out arithmetically. Or am I misunderstanding the idea?
@gulshan-123 I saw you had made a PR, unfortunately I had to close it as there is not yet a specific decision on this issue, but please feel free to chime in here about this. For work to be approved, the "improve access" question has to be answered, as this is a core value of the project.