My first impulse is to precompute all of those sines and cosines. Just precalculate an array at the beginning of your program and then just use like mySin[a] myCos[b] instead of having to recalculate them every single time. Then you would only have the ATan2 to worry about. Of course there's probably a better way of doing it mathematically but I'll have to confess to being less than a math genius.
Optimising Challenge
BlitzMax Forums/BlitzMax Programming/Optimising ChallengeThe forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.