corrected mistake on scalarProjection computation