Why doesn't this converge to $\pi$? $\lim_{n\to\infty}\frac12\sqrt{2-2\cos( \frac{2 \pi}{n} )} \times n$ Suppose a regular polygon with $n$ side has radius (line from center to point that connect sides *I don't know how to call it) of length $r$.
From cosine law, the side would has length of  $$\sqrt{2r^2-2r^2\cos( \frac{2 \pi}{n} )} $$
Perimeter would be $$\sqrt{2r^2-2r^2cos( \frac{2 \pi}{n} )}  \times n $$
Circle has infinitely-many sides and circumference of $2\pi r$
So $$\lim_{n \rightarrow \infty}  \sqrt{2r^2-2r^2\cos( \frac{2 \pi}{n} )}  \times n= 2 \pi r$$
And
 $$\lim_{n \rightarrow \infty} \frac{\sqrt{2-2\cos( \frac{2 \pi}{n} )}  \times n}{2}= \pi$$
But, when I plot it on Desmos, the graph scatters at $5.9\times 10^8$ (in the picture). Can anybody give me reason why this happens? 
Graph

The limit set up is correct, indeed by standard limit we have that
$$\frac{ \sqrt{ 2-2cos( \frac{2 \pi}{n} )}n }{2}=\sqrt 2 \pi \sqrt{ \frac{1-cos( \frac{2 \pi}{n} )}{\left( \frac {2\pi} n\right)^2} }\to \pi$$
therefore the problem could be a numerical issue with desmos.
