code: func (nm *nelderMead) checkIteration(vertices vertices) bool {
  	// this will never be true for += inf
  	if math.Abs(vertices[0].result-nm.config.Target) < delta {
  		return false
  	}
  
  	best := vertices[0]
  	// here we are checking distance convergence.  If all vertices
  	// are near convergence, that is they are all within some delta
  	// from the expected value, we can go ahead and quit early.  This
  	// can only be performed on convergence checks, not for finding
  	// min/max.
  	if !isInf(nm.config.Target) {
  		for _, v := range vertices[1:] {
  			if math.Abs(best.distance-v.distance) >= delta {
  				return true
  			}
  		}
  	}
  
  	// next we want to check to see if the changes in our polytopes
  	// dip below some threshold.  That is, we want to look at the
  	// euclidean distances between the best guess and all the other
  	// guesses to see if they are converged upon some point.  If
  	// all of the vertices have converged close enough, it may be
  	// worth it to cease iteration.
  	for _, v := range vertices[1:] {
  		if best.euclideanDistance(v) >= delta {
  			return true
  		}
  	}
  
  	return false
  }
docs: // checkIteration checks some key values to determine if
  // iteration should be complete.  Returns false if iteration
  // should be terminated and true if iteration should continue.