Compute the vector projection of a 3-vector onto another. x : size 1 x 3 and y : size 1 x 3 tol : size 1 x 1
vec_projection ([1,0,0], [0.5,0.5,0]) ⇒ 0.70711
Vector projection of x onto y, both are 3-vectors, returning the value of x along y. Function uses dot product, Euclidean norm, and angle between vectors to compute the proper length along y.
Package: linear-algebra