_evaluateStepQuality() {
    let dx, dy, dpos;
    const nodes = this.body.nodes;
    const reference = this.referenceState;
    const posThreshold = 0.3;

    for (const nodeId in this.referenceState) {
      if (
        Object.prototype.hasOwnProperty.call(this.referenceState, nodeId) &&
        nodes[nodeId] !== undefined
      ) {
        dx = nodes[nodeId].x - reference[nodeId].positions.x;
        dy = nodes[nodeId].y - reference[nodeId].positions.y;

        dpos = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));

        if (dpos > posThreshold) {
          return false;
        }
      }
    }
    return true;
  }
This compares the reference state to the current state
@returns {boolean}
@private