processing / processing-docs

[Deprecated] Processing reference, examples, tutorials, and website
https://processing.org
371 stars 179 forks source link

Weird thing in Processing 3 #810

Closed sharmadhruv741 closed 4 years ago

sharmadhruv741 commented 4 years ago

I was checking out the tutorials on Processing's website when I noticed something weird. In the 'interactivity' page, there's this one example code under Mouse Events where the user can increase the amount of whiteness of the background whenever he clicks mouse. I kept on clicking until it became white and after that it weirdly turned to black again. The weirder thing was that when I kept on clicking after that, it was turning more bluer until it became completely blue after which it turned to black again. This keeps on recurring as long as I keep clicking the mouse.

https://processing.org/tutorials/interactivity/

Is this normal? I don't know. I'm pretty new to programming and Processing. So, just thought of bringing this to the attention of the person concerned.

REAS commented 4 years ago

Yes, that's just how the numbers work with integers and fill() and stroke(). I agree, it is weird. It might be a good question for the Processing Discourse: https://discourse.processing.org/