summaryrefslogtreecommitdiff
path: root/include/sinlut.h
blob: 126679f2f8ff42b59494c0207bb78f5fd680c01e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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