>>774
>w = n + sin(M_PI * i / 180) * n;
w = n + (int)(sin(M_PI * i / 180) * n);