sub method

void sub(
  1. int index,
  2. Vector2 vector
)

Substract vector from the vector at index.

Implementation

void sub(int index, Vector2 vector) {
  final i = _vectorIndexToBufferIndex(index);
  final storage = vector.storage;
  buffer[i + 0] -= storage[0];
  buffer[i + 1] -= storage[1];
}