mirror of
https://github.com/jkl1337/SwiftPFFFT.git
synced 2026-01-02 03:34:31 -06:00
initial commit
This commit is contained in:
22
Sources/PFFFT/PFFFT.swift
Normal file
22
Sources/PFFFT/PFFFT.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
internal import PFFFTLib
|
||||
|
||||
extension pffft_transform_t {
|
||||
@inline(__always)
|
||||
init(_ type: FFTType) {
|
||||
switch type {
|
||||
case .real: self = PFFFT_REAL
|
||||
case .complex: self = PFFFT_COMPLEX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension pffft_direction_t {
|
||||
@inline(__always)
|
||||
init(_ sign: FFTSign) {
|
||||
switch sign {
|
||||
case .forward: self = PFFFT_FORWARD
|
||||
case .backward: self = PFFFT_BACKWARD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user