projects
/
snes_test1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
vertical wave
[snes_test1]
/
sintab
/
sintab.c
diff --git a/sintab/sintab.c
b/sintab/sintab.c
new file mode 100644
(file)
index 0000000..
150a32d
--- /dev/null
+++ b/
sintab/sintab.c
@@ -0,0
+1,13
@@
+#include <stdio.h>
+#include <math.h>
+
+int main(void)
+{
+ int i;
+
+ printf("sintab:\n");
+ for(i=0; i<256; i++) {
+ float s = sin(i * 2.0 * M_PI / 256.0) * 0.5 + 0.5;
+ printf("\t.byte %d\n", (int)(s * 255.0));
+ }
+}