I dont know if its even possible but i want to make this function that calculates mean of vector accept both float and double. is there any way to make it? thanks.
#include <numeric>
#include <stdint.h>
#include <vector>
int mean(std::vector<float> var)
{
int number = var.size();
int varAcc = std::accumulate(var.begin(), var.end(), 0);
return varAcc / number;
}```