Is it better to create vectors using the createVector() function or as a new object?

I currently use them interchangeably. When I need a vector with specific parameters already in place, I use createVector(). When I don't specify any parameters, I do it this way: var v = new p5.Vector();

I don't really know if there's any huge advantage of using the createVector() function, but I use vectors regularly to shorten my code, so I'm curious.

Answers

Sign In or Register to comment.