Code-Package-Processing-1.5.1
Code-Package-Processing-1.5.1 copied to clipboard
Avoid negative text size in P.3.0
I wrapped the difference in a call to abs() to avoid ending up with a negative text size when the mouse is in the left part of the screen.
The behavior of textSize() with negative values in unspecified; starting the sketch with the mouse in the left part of the canvas, I observed first a downward letter A, scaled according to the cursor horizontal position, then flipped in upright position when the mouse crosses the middle of the canvas; from this point, whenever the cursor is in the left part of the canvas, the letter's height is fixed to a small value, which no longer changes according to horizontal position.