_updateBranchMass(parentBranch, node) {
    const centerOfMass = parentBranch.centerOfMass;
    const totalMass = parentBranch.mass + node.options.mass;
    const totalMassInv = 1 / totalMass;

    centerOfMass.x =
      centerOfMass.x * parentBranch.mass + node.x * node.options.mass;
    centerOfMass.x *= totalMassInv;

    centerOfMass.y =
      centerOfMass.y * parentBranch.mass + node.y * node.options.mass;
    centerOfMass.y *= totalMassInv;

    parentBranch.mass = totalMass;
    const biggestSize = Math.max(
      Math.max(node.height, node.radius),
      node.width
    );
    parentBranch.maxWidth =
      parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth;
  }
this updates the mass of a branch. this is increased by adding a node.
@param {object} parentBranch
@param {Node} node
@private