what does this line do?

Code:

sum2 = ((sum2) + (values[f]-average)(values[f]-average) )

whats "average" and what is "(values[f]-average)(values[f]-average)" do?

just seen you post, i still dont know what the second part does tho.

Code:

i forgot to add this when i copy/pasted
float average;
float sum;
for (int i = 0; i<values.size(); i = i + 1)
{ sum = sum + values[i];
average = sum/ values.size();
}

your calculating the average every loop here.