== Use Flash; faster == I really don't know if this algorithm is legitimate: n*tan(180°/n) I really couldn't explain it without going into limits, so sorry... Oh, and it's pretty fast with numbers like 10000000 Hehe I typed 45394703209470934593847593847593457 and it still works =D