Mercurial > hg > forks > pwpunix
annotate oldchsool/pwpdemo.h @ 0:acb5694e93d9
Initial import.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 18 May 2010 04:25:44 +0300 |
parents | |
children | 475342949dcd |
rev | line source |
---|---|
0 | 1 #include "pwplib.h" |
2 #define USE_SINTAB | |
3 | |
4 #define MAX(a,b) ((a)>(b)?(a):(b)) | |
5 #define MIN(a,b) ((a)<(b)?(a):(b)) | |
6 | |
7 #ifndef USE_SINTAB | |
8 #define SIN(a) (sin((a)*3.1415926/128)*32767) | |
9 #define COS(a) ((3.1415926/2)+(cos((a)*3.1415926/128))*32767) | |
10 #else | |
11 #ifndef HAS_SINTAB | |
12 extern signed int sintab16[]; | |
13 #endif | |
14 #define SIN(a) sintab16[(a)&255] | |
15 #define COS(a) sintab16[((a)+64)&255] | |
16 #endif | |
17 |