From 648d4d2d094a5c90535c94ef625eb429de018adb Mon Sep 17 00:00:00 2001 From: Saveliy Yusufov Date: Fri, 9 Feb 2024 14:17:50 -0500 Subject: [PATCH] Fix assertion in `fft_with_opts_and_plan` - Twiddles should always be half the size of input --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index cb620cc..737ff74 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,7 +65,7 @@ pub fn fft_with_opts_and_plan( // We shouldn't be able to execute FFT if the # of twiddles isn't equal to the distance // between pairs - assert!(twiddles_re.len() / 2 == reals.len() && twiddles_im.len() / 2 == imags.len()); + assert!(twiddles_re.len() == reals.len() / 2 && twiddles_im.len() == imags.len() / 2); for t in (0..n).rev() { let dist = 1 << t;