forgot to change the cosine offset to match the 1024 lut size
[retrobench] / src / util.h
index 9f0eb4d..d1f81eb 100644 (file)
@@ -14,8 +14,8 @@ typedef unsigned int uint32_t;
 
 extern int sinlut[];
 
-#define SIN(x) sinlut[(x) & 0xff]
-#define COS(x) sinlut[((x) + 64) & 0xff]
+#define SIN(x) sinlut[(x) & 0x3ff]
+#define COS(x) sinlut[((x) + 256) & 0x3ff]
 
 int mask_to_shift(unsigned int mask);