applyToVector3Array method Null safety

List<double> applyToVector3Array(
  1. List<double> array,
  2. [int offset = 0]
)

Multiply this to each set of xyz values in array starting at offset.

Implementation

List<double> applyToVector3Array(List<double> array, [int offset = 0]) {
  for (var i = 0, j = offset; i < array.length; i += 3, j += 3) {
    final v = Vector3.array(array, j)..applyMatrix3(this);
    array[j] = v.storage[0];
    array[j + 1] = v.storage[1];
    array[j + 2] = v.storage[2];
  }

  return array;
}