Rename buffer mapInPlace to enumerateInPlace.

Document and simplify some methods.
This commit is contained in:
2024-10-31 02:33:14 -05:00
parent 2ffe635962
commit 795003432e
4 changed files with 36 additions and 5 deletions

View File

@@ -3,12 +3,12 @@ import ComplexModule
import XCTest
final class FFTTests: XCTestCase {
func testFftFloat() throws {
func testFftComplexFloat() throws {
let fft = try FFT<Complex<Float>>(n: 16)
let signal = fft.makeSignalBuffer()
let spectrum = fft.makeSpectrumBuffer()
signal.mapInPlace { i, v in
signal.enumerateInPlace { i, v in
v = Complex(Float(i) + 1.0, Float(i) - 2.0)
}