diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-18 04:35:33 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-18 04:35:33 +0000 |
commit | 9ff5ccdea43ff2a954c1a400516dc6858e188e9c (patch) | |
tree | 6098867a573275a38bf000a382752bf115af0765 /externals/grill/fftease/src/swinger~.cpp | |
parent | 478eeca99ee6f5bad3063700fbcc9d8913c770ae (diff) |
""
svn path=/trunk/; revision=344
Diffstat (limited to 'externals/grill/fftease/src/swinger~.cpp')
-rw-r--r-- | externals/grill/fftease/src/swinger~.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/externals/grill/fftease/src/swinger~.cpp b/externals/grill/fftease/src/swinger~.cpp index 39fbd9a1..b2ecba34 100644 --- a/externals/grill/fftease/src/swinger~.cpp +++ b/externals/grill/fftease/src/swinger~.cpp @@ -49,10 +49,12 @@ V swinger::Transform(I _N2,S *const *in) // replace signal one's phases with those of signal two const F a1 = ( i == _N2 ? _buffer1[1] : _buffer1[even] ); const F b1 = ( i == 0 || i == _N2 ? 0. : _buffer1[odd] ); + // amplitude only const F amp = hypot( a1, b1 ); const F a2 = ( i == _N2 ? _buffer2[1] : _buffer2[even] ); const F b2 = ( i == 0 || i == _N2 ? 0. : _buffer2[odd] ); + // phase only const F ph = -atan2( b2, a2 ); _buffer1[even] = amp * cos( ph ); |