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