Orthogonal projection.
A | vector that determines the line of the projection. Not necessarily the unit vector. |
b | Project this vector to a. |
return value | The orthogonally projected vector. |
Calculates the orthogonal projection of vector b to a line determined by vector a.
proj([1,1,0], [3,2,4])