Ok, well basically, using calculus, you can show that
\sin{x} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + ...
where x is in radians. (You can easily verify this for yourself on a graphing calculator, if you have one.) This infinite series converges for all x, but it is centered around zero, so it converges for low numbers "before" it converges for high ones. In fact, for numbers that are infinitely close to zero, you can just drop the higher order terms and say that \sin(x) = x. You were taking x to be infinitely high, so \frac{\pi}{2x} would be very low, and you can say that 2x\sin(\frac{\pi}{2x}) = 2x(\frac{\pi}{2x}) = 2(\frac{\pi}{2}) = \pi. Nice, huh?
(Incidentally, I arrived at a formula very similar to yours when I was a sophomore in high school, and knew geometry but not calculus. Would I be correct in guessing that you arrived at it by calculating the circumference of a regular polygon with an infinite number of sides?)