diff options
author | Logan Hunt <loganthebean222@gmail.com> | 2020-08-10 14:04:44 -0600 |
---|---|---|
committer | Logan Hunt <loganthebean222@gmail.com> | 2020-08-10 14:04:44 -0600 |
commit | e09a23f0a4f342aa83854ce8cc11aacc09e350fd (patch) | |
tree | 07e8b8365705d9df134e59fa2a0215ba1d902c35 /include/sinlut.h | |
parent | 7f856467a086ec9a3ebd1ccdf12e578dffb9c98b (diff) | |
download | geometry-dash-gba-e09a23f0a4f342aa83854ce8cc11aacc09e350fd.tar.gz geometry-dash-gba-e09a23f0a4f342aa83854ce8cc11aacc09e350fd.zip |
Added rotation
Diffstat (limited to 'include/sinlut.h')
-rw-r--r-- | include/sinlut.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/sinlut.h b/include/sinlut.h new file mode 100644 index 0000000..126679f --- /dev/null +++ b/include/sinlut.h @@ -0,0 +1,15 @@ +#include "types.h" + +#ifndef SINLUT_H +#define SINLUT_H + +extern const short sin_lut[512]; + +static inline s32 lu_sin(u32 theta) +{ return sin_lut[(theta>>7)&0x1FF]; } + +//! Look-up a cosine value +static inline s32 lu_cos(u32 theta) +{ return sin_lut[((theta>>7)+128)&0x1FF]; } + +#endif //SINLUT_H |