Let $R$ be the circumradius, $r$ the inradius and $a$ the side-length of a regular $n$-gon. Then $$\frac{a}{R}=2\sin\frac\pi n$$ and $$\frac{a}{r}=2\tan\frac\pi n.$$
The reason? There's a right-angled triangle with hypotenuse $R$, and side-lengths $r$ and $a/2$ adjacent and opposite to an angle $\pi/n$.