Uvs ready to be merge

I would save 1/_pts.size() in a variable and multiply that to centroid. 

Processor clocks for division are more than multiplication.