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().

View Code
Download Code
Live Demo