Struct Complex Copy item path Source pub struct Complex {
pub real: f64 ,
pub imag: f64 ,
}Expand description Complex number representation for FFT
This struct provides basic complex arithmetic operations needed
for Fast Fourier Transform algorithms. It includes addition,
multiplication, and scaling operations optimized for FFT usage.
The real part of the complex number
The imaginary part of the complex number
Create a new complex number
§ Arguments
real - The real part
imag - The imaginary part
§ Returns
A new Complex number with the specified real and imaginary parts
Create a complex number from a real number
§ Arguments
real - The real value to convert
§ Returns
A complex number with the real value and zero imaginary part
Complex addition
§ Arguments
other - The complex number to add
§ Returns
The sum of self and other
Complex subtraction
§ Arguments
other - The complex number to subtract
§ Returns
The difference of self and other
Complex multiplication
§ Arguments
other - The complex number to multiply
§ Returns
The product of self and other
Scalar multiplication
§ Arguments
scalar - The real number to multiply by
§ Returns
The complex number scaled by the scalar
Fallback for no_std - requires std feature
This function is not available in no_std environments and will panic.
Use the std feature to enable FFT functionality.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.