Centroid Calculator For Two Functions