package solver

// Calculate the average rate in a stored slice of rates.
func (solver *Solver) calcAVG() (avg uint64) {
	var avgSum uint64

	for _, value := range solver.rates {
		avgSum += uint64(value)
	}

	avg = avgSum / uint64(len(solver.rates))

	return
}
