Could someone convert a little c maths code for me

Miscellaneous Forums/General Discussion/Could someone convert a little c maths code for me

for(i=1;i<nRows-1;i++) means FOR i = 1 TO nRows-2, not nRows-1.
Or use Until: For i = 1 Until nRows-1.

Wouldn't Sinf() and Cosf() be expecting radians?
Yes it would.