blob: 0278414c54ed2b84b0a3d9b3eda2b4bf1b6fbbda [file] [log] [blame]
// Copyright ©2020 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fftpack
// swap returns c with the real and imaginary parts swapped.
func swap(c complex128) complex128 {
return complex(imag(c), real(c))
}
// scale scales the complex number c by f.
func scale(f float64, c complex128) complex128 {
return complex(f*real(c), f*imag(c))
}