/// <summary>
 /// Subtracts each element of the vector from a scalar and stores the result in the result vector.
 /// </summary>
 /// <param name="scalar">The scalar to subtract from.</param>
 /// <param name="result">The vector to store the result of the subtraction.</param>
 protected void DoSubtractFrom(T scalar, Vector <T> result)
 {
     DoNegate(result);
     result.DoAdd(scalar, result);
 }