I think the problem itself is the difference between blitz' cos/sin and c++ cos/sin.
In Blitz, cos/sin use degrees and in C++, radians.
The conversion between them is * pi / 180, but I don't remeber which way around, so you might need to invert it.
And I would make all variables float, so that when you use them in a division, the outcome will not become an integer.
In Blitz, cos/sin use degrees and in C++, radians.
The conversion between them is * pi / 180, but I don't remeber which way around, so you might need to invert it.
And I would make all variables float, so that when you use them in a division, the outcome will not become an integer.