I\'m creating a class which is supposed to be able to be used with an array of any type of number (float, int, etc), so here is one method I have:
// T exten
I think this is what you want
public synchronized average() { double ret = new double[queue[0].length]; for (int i = 0; i < ret.length; ++i) { for (int j = 0; j < size; ++j) { ret[i] += queue[j][i]; } ret[i] /= size; } return ret; }