Unit Vector (Normalize)
Nature of Code Lesson #1.5
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.Vector.normalize(), p5.Vector.setMag().
Community Contributions
You can also add your own version! (See how)