Rev 28 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /* |
2 | * ap_math.h |
||
3 | * |
||
4 | * Created on: 31 Jan 2016 |
||
5 | * Author: Mike |
||
6 | */ |
||
7 | |||
8 | #ifndef INC_AP_MATH_H_ |
||
9 | #define INC_AP_MATH_H_ |
||
10 | |||
11 | #define AP_K 256 |
||
12 | #define AP_SCALE(x) ((x)/AP_K) |
||
46 | mjames | 13 | |
14 | /* the number of steps in 90 degrees */ |
||
15 | #define SINE_SCALING 4 |
||
16 | #define SINE_STEPS (90*SINE_SCALING) |
||
17 | |||
2 | mjames | 18 | extern void ap_init(void); |
19 | |||
20 | extern int ap_sin(int x); |
||
21 | extern int ap_cos(int x); |
||
22 | |||
23 | |||
24 | |||
25 | #endif /* INC_AP_MATH_H_ */ |