1.5 A Unit Vector
Back 10 / 35
In this video, I explain the concept of a “unit vector,” what it means to “normalize” a vector, and take a look at the p5.js functions: p5.Vector.mag ...
p5 reference entry for the p5.Vector mag method
p5 reference entry for the p5.Vector normalize method
p5 reference entry for the p5.Vector setMag method
Source code for the p5.Vector normalize method
Source code for the p5.Vector setMag method