use num_traits::{FromPrimitive, Signed};
use std::fmt::Debug;

pub trait FFTnum: Copy + FromPrimitive + Signed + Debug + 'static {}

impl FFTnum for f32 {}
impl FFTnum for f64 {}


#[inline(always)]
pub fn verify_length<T>(input: &[T], output: &[T], expected: usize) {
	assert_eq!(input.len(), expected, "Input is the wrong length. Expected {}, got {}", expected, input.len());
	assert_eq!(output.len(), expected, "Output is the wrong length. Expected {}, got {}", expected, output.len());
}


#[inline(always)]
pub fn verify_length_divisible<T>(input: &[T], output: &[T], expected: usize) {
	assert_eq!(input.len() % expected, 0, "Input is the wrong length. Expected multiple of {}, got {}", expected, input.len());
	assert_eq!(input.len(), output.len(), "Input and output must have the same length. Expected {}, got {}", input.len(), output.len());
}

use num_traits::{FromPrimitive, Signed};

pub trait FFTnum: Copy + FromPrimitive + Signed + 'static {}

impl FFTnum for f32 {}
impl FFTnum for f64 {}


#[inline(always)]
pub fn verify_length<T>(input: &[T], output: &[T], expected: usize) {
	assert_eq!(input.len(), expected, "Input is the wrong length. Expected {}, got {}", expected, input.len());
	assert_eq!(output.len(), expected, "Output is the wrong length. Expected {}, got {}", expected, output.len());
}


#[inline(always)]
pub fn verify_length_divisible<T>(input: &[T], output: &[T], expected: usize) {
	assert_eq!(input.len() % expected, 0, "Input is the wrong length. Expected multiple of {}, got {}", expected, input.len());
	assert_eq!(input.len(), output.len(), "Input and output must have the same length. Expected {}, got {}", input.len(), output.len());
}

Revert "FFTnum now requires Debug"
Revert "FFTnum now requires Debug"

This reverts commit e0ba38387e0fadd8088f40148d003ff4cebac3b1.
