casting to integers for cosine/sine is a bad idea. You'll almost always get zero because of truncation.