Sin/Cos Lookup Tables

Blitz3D Forums/Blitz3D Programming/Sin/Cos Lookup Tables

The 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.

But sin/cos tables aren't optimizations. You're going to
see equal amounts of time using lookups as you are if you don't when you're finding a vanilla sin or cos.
Equation tables are a great optimization and are very useful. Richard Betsons example is a great example of its use.

One way I optimize for effects is to calculate one sin each loop and store an offset for a bobing rotating effect in some of my pickup items. I store the ofset in the type of the foo. This saves me a sin calc or a lookup for each and replaces them with a simple addition.