addScaled method

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

Add vector scaled by factor to the vector at index.

Implementation

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