3d Math Primer book equation derivation - Projecting One vector onto another I'm reading the book 3d Math Primer for Graphics and Game Development 1st edition by Fletcher Dunn and Ian Parberry. On page 61 there's this:



How does it derive $ v_{||} $ there? It doesn't follow from what preceded this point in the book, unless I'm missing something. Also I'm not sure, is $n$ supposed to be unit vector here? This should probably be in the errata but I didn't find anything. Anyway, how did he deduce this equation? Thanks in advance.
Since v∥ is parallel to n, it can be expressed as some multiple of n. The multiple is the ratio of the length of v∥ to the length of n. The n vector doesn’t have to be normalized, but if it is, then |n| is 1, so the equation becomes v∥ = n * |v∥|.