Project vector a onto vector b: projᵦa = ((a·b) / (b·b)) · b.
Remix "Vector Projection" into your own editable copy — tweak it, share it, make it yours.