aboutsummaryrefslogtreecommitdiff
path: root/common/cosinetables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/cosinetables.cpp')
-rw-r--r--common/cosinetables.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/cosinetables.cpp b/common/cosinetables.cpp
index fe8f454e14..3b245750fa 100644
--- a/common/cosinetables.cpp
+++ b/common/cosinetables.cpp
@@ -34,10 +34,10 @@ CosineTable::CosineTable(int bitPrecision) {
int m = 1 << _bitPrecision;
double freq = 2 * M_PI / m;
- _table = new float[m];
+ _table = new float[m / 2];
- // Table contains cos(2*pi*x/n) for 0<=x<=n/4,
- // followed by its reverse
+ // Table contains cos(2*pi*i/m) for 0<=i<m/4,
+ // followed by 3m/4<=i<m
for (int i = 0; i <= m / 4; i++)
_table[i] = cos(i * freq);