Finding the geometric center of the figures

Actually, the real center of the figure [[1,1], [1,1], [9,9], [9,9]] is [5.0,5.0], but it is not [5.5,5.5]

and the formula for calculating the center is x = (min_x + max_x) / 2, y = (min_y + max_y) / 2