• Advertisement
Sign in to follow this  

sin/cos fast enough?

This topic is 4905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, all. I know that this could just as easily be a math question, but I'm asking here because I'm asking specifically in refrence to matrix and Quaternion math. Has anyone found any compelling reason to use a sin cos table over sin and cos themselves? I started using a table because it just seems like on of those things you do, but I found that it introduced errors in my animation routines, as such I would much rather use the functions.

Share this post


Link to post
Share on other sites
Advertisement
A sin/cos lookup table will either eat up valuable cache or suffer from slow RAM. The CPU is a lot faster than RAM; if you're programming for a PC use the functions.

Lookup tables are useful for devices like the TI-89 or GBA; neither of those have hardware floats so lookup tables and fixed point are much faster. With a modern PC, however, it's best to use the functions.

Share this post


Link to post
Share on other sites
use sin/cos normally until you discover _with a profiler_ that the sin/cos code is actually causing a bottleneck in your app/game. it's generally never a problem.

-me

Share this post


Link to post
Share on other sites
Quote:
Original post by Palidine
use sin/cos normally until you discover _with a profiler_ that the sin/cos code is actually causing a bottleneck in your app/game. it's generally never a problem.

-me


Duh, you think I would have thought to think like that as that is how I usually think of things, but for some reason I didn't. That makes perfect sense.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement