scalarproj

Calculates the scalar projection of the vector a on the vector b in 2D or 3D.Depending on input, function can return scalar, vector or matrix

Arguments

  1. Vector a, size 2 or 3.
  2. Vector b, size 2 or 3.

Output

Real, magnitude of projected vector

Examples

scalarproj