'p5js pass an array of x y coordinates to ellipse function
in p5js you can draw a circle using ellipse(100,100,20) - is it possible to pass an array of [100,100,20] to the ellipse function?
this doesn't work:
var arr = [100,100,20];
ellipse((...arr));
Solution 1:[1]
Why the double parentheses? Spread operator inside the double parentheses causes a syntax error.
ellipse((...arr));
ellipse(...arr);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
