Skip to content

Instantly share code, notes, and snippets.

@saschagrunert
Created May 13, 2018 12:07
Show Gist options
  • Save saschagrunert/648c8c055ba8037c0c93946c1c3563ac to your computer and use it in GitHub Desktop.
Save saschagrunert/648c8c055ba8037c0c93946c1c3563ac to your computer and use it in GitHub Desktop.
double average(const std::vector<uint32_t> & input) {
return std::accumulate(input.cbegin(),
input.cend(),
0) / (double)input.size();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment