It will be easier to explain how to solve this question in a square. If you rotate 4-sided square from the centre, you need to rotate it 90 degrees. The formula for this would be: 360 ° /the side count. In a square, it would be 360° /4= 90°.
In 18-sided polygon, the calculation would be: 360°/ 18 side= 20°