How to empty an array?
in
Programming Questions
•
3 years ago
Hi folks,
Is there a simple way to clear all the elements of an array? I have a program which generates arrays of points to draw 3d geometry, and at the moment I'm just calling setup() to clear it and start over. The only problem with that is it resets the camera position (I'm using the PeasyCam library) which I'd rather it didn't do.
Any suggestions, other than using shorten() however many times?
Thanks
Kyle
1