721
edits
Line 53: | Line 53: | ||
* sum up our points: | * sum up our points: | ||
< | <syntaxhighlight lang="c++" inline> | ||
p0 + p1 + p2 + p3 ... = sum | |||
</ | </syntaxhighlight> | ||
* divide the sum by out number of point: | * divide the sum by out number of point: | ||
< | <syntaxhighlight lang="c++" inline> | ||
centroid = sum / num_of_points | centroid = sum / num_of_points | ||
</ | </syntaxhighlight> | ||
== Example Centroid Calculation == | == Example Centroid Calculation == |