Array processing function

The function is working as you want. The problem is that you are re-creating the array as empty each time draw() gets called, so you’re wiping out the values coord() gave you. Move your println() to inside the if() block.

Keep in mind that the default frameCount goes up 60 times per second. You’re spewing out println()s that often.

1 Like