We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have an error of which happens every time I do calculation with width or height in the setup() function.
The error is this.
p5.js:15092 Uncaught IndexSizeError: Failed to execute 'arcTo' on 'CanvasRenderingContext2D': The radius provided (-2) is negative.
Here is an example. Note line 10.
This code will not working.
The error is like this.
However changing the line 10 into this make the application works again.
Is this behavior intended? How can I do calculation with width and height in the setup() function?