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