setXYZ method

void setXYZ(
  1. int index,
  2. double x,
  3. double y,
  4. double z,
)

Sets the x, y and z components of the vector at the given index.

Implementation

void setXYZ(int index, double x, double y, double z) {
  int idx = index * itemSize;

  array[idx + 0] = x.toDouble();
  array[idx + 1] = y.toDouble();
  array[idx + 2] = z.toDouble();
}