summaryrefslogtreecommitdiff
path: root/include/trig.h
blob: 477a0163f1ecea4f1a5ed53c3c7d154cdaa4c869 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef GUARD_TRIG_H
#define GUARD_TRIG_H

// Converts a number to Q8.8 fixed-point format
#define Q_8_8(n) ((s16)((n) * 256))

extern const s16 gSineTable[];

s16 Sin(s16 index, s16 amplitude);
s16 Cos(s16 index, s16 amplitude);
s16 Sin2(u16 angle);
s16 Cos2(u16 angle);

#endif // GUARD_TRIG_H