addScaled method

void addScaled(
  1. int index,
  2. Vector4 vector,
  3. double factor
)

Add vector scaled by factor to the vector at index.

Implementation

void addScaled(int index, Vector4 vector, double factor) {
  final i = _vectorIndexToBufferIndex(index);
  final storage = vector.storage;
  buffer[i + 0] += storage[0] * factor;
  buffer[i + 1] += storage[1] * factor;
  buffer[i + 2] += storage[2] * factor;
  buffer[i + 3] += storage[3] * factor;
}