Skip to content

Commit c18bdfd

Browse files
committed
Create changelog.md
1 parent 5d00c39 commit c18bdfd

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

changelog.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 2.0.0
2+
3+
## Breaking
4+
5+
- ESM only. Use `import rfft from 'fourier-transform'` instead of `require()`.
6+
- Returns `Float64Array` instead of `Array`.
7+
- Returns internal buffer by default — overwritten on next call with same N. Pass an output buffer to keep results: `rfft(input, output)`.
8+
- Fixed off-by-one in magnitude spectrum. Imaginary components were indexed as `x[N-k-1]` instead of `x[N-k]`, shifting bins with imaginary content by one. Results are now correct.
9+
- Rejects N < 2 (previously N=1 returned empty array silently).
10+
- Removed `asm.js` entry point.
11+
12+
## Added
13+
14+
- `fft()` named export — returns complex DFT as `{ re, im }`, N/2+1 bins, unnormalized.
15+
- Optional output buffer parameter for both `rfft()` and `fft()`.
16+
17+
## Performance
18+
19+
- Float64Array working buffers instead of generic Array.
20+
- Precomputed twiddle factors and bit-reversal table, cached per size.
21+
- Zero-copy real part in `fft()` via subarray view.
22+
- ~2.7x faster than dsp.js (the original split-radix ancestor).
23+
- On par with fft.js (indutny) in raw transform speed.
24+
25+
## Removed
26+
27+
- `asm.js` — no modern engine validates `'use asm'` anymore.
28+
- All runtime dependencies (zero deps).

0 commit comments

Comments
 (0)