Rotating all sides of a polygon around its centre such that one of its sides are parallell to the x-axis [closed]

The slope of one of the sides is given by $$\text{slope} = \tan \theta = \frac{y_2-y_1}{x_2-x_1} $$ So the required angle is $$\arctan \frac{y_2-y_1}{x_2-x_1} $$