Moved sin & cos calls outside of loop for 25% performance gain.