gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > inverse COS SIN and TAN

#154334 - TheMagnitude - Mon Apr 14, 2008 10:34 pm

is there any lookup tables for inverse SIN COS or TAN like there are lookup tables for ordinary COS SIN?

Im trying to eliminate my atan2() function and convert fully to a fixed point system, much faster :)

#154335 - simonjhall - Mon Apr 14, 2008 10:42 pm

I don't think there are any in the existing configuration, but it wouldn't be too hard to roll your own. How about automatically building one at startup?
_________________
Big thanks to everyone who donated for Quake2

#154336 - silent_code - Mon Apr 14, 2008 11:27 pm

cearn has an exel lut table builder thingy on his site. check it out, might be useful! :^)

#154338 - tepples - Mon Apr 14, 2008 11:41 pm

My makefile system knows of two separate C compilers. For files in "src/", it uses $(DEVKITARM)/bin/arm-eabi-gcc. For files in "tools/", it uses gcc. Things like bitmap converters and lookup table builders go in "tools/".

Tables for arctangent might be a bit harder to think through because the domain of arctangent is the real line. But then if you know the arctangent of 1/y, the arctangent of y is trivial to compute.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.