getCenterOfMass method

Vector3 getCenterOfMass()

Implementation

Vector3 getCenterOfMass() {
  var sum = getAllPoints().reduce((a, b) => a + b);
  return sum / getNumPoints();
}