I’m trying to rewrite my programs & classes to use vectors.
vectors themselves are easy, but going about the operations in p5.js has me getting lost in the syntax.
As a simple example I make 2 vectors to create a line :
v1 = createVector(x,y) v2 = createVector(u,v) line(x,y,u,v);
how would I rewrite this math?
u = y+x*2; v = x-y*4;
I feel this isn’t the most efficient way to do this, but I’m only interested in the math operations without using mag or cross.