/// <summary> /// Sets this vector to the project of the original onto the given vector /// </summary> /// <param name="v">the vector onto which this vector is projected</param> public void ProjectionEquals(NetronVector v) { this.SetTo(v.Multiply((this.DotProduct(v)) / (v.DotProduct(v)))); }
/// <summary> /// Returns the projection of this vector on the given one /// </summary> /// <param name="v">the vector onto which this vector is projected</param> /// <returns>the resulting vector</returns> public NetronVector Projection(NetronVector v) { return(v.Multiply((this.DotProduct(v)) / (v.DotProduct(v)))); }