addScaled method

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

Add vector scaled by factor to the vector at index.

Implementation

void addScaled(int index, Vector3 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;
}