/vector2/normalize
stdNormalizes the given vector. Returns [0, 0] vector for points.
Type signature
(vector: [number, number]) => [number, number]
Examples
normalize([2, 3]);
// ⇒ [2 / length([2, 3]), 3 / length([2, 3])]
Try in REPL
Questions
- How to normalize a vector?