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 > I can't find any documentation for trig_lut.h

#153536 - TheMagnitude - Tue Apr 01, 2008 2:20 pm

Can someone explain to me how to use:

Code:
extern short COS_bin[];
extern short SIN_bin[];
extern short TAN_bin[];

#153538 - M3d10n - Tue Apr 01, 2008 2:55 pm

Those are look-up tables. They have 512 entires each, so you convert your angles to 0-511 range and use that to access the cos/sin/tan values (4.12 16-bit fixed point value).