Trait IntoComplex

Source
pub trait IntoComplex<T> {
    type Complex: ComplexNum<T>;

    // Required method
    fn into_complex(self, real: bool) -> Self::Complex
       where Self: Sized;

    // Provided methods
    fn into_re(self) -> Self::Complex
       where Self: Sized { ... }
    fn into_im(self) -> Self::Complex
       where Self: Sized { ... }
}
Expand description

Trait for converting a type into a complex number.

Required Associated Types§

Required Methods§

Source

fn into_complex(self, real: bool) -> Self::Complex
where Self: Sized,

Provided Methods§

Source

fn into_re(self) -> Self::Complex
where Self: Sized,

Source

fn into_im(self) -> Self::Complex
where Self: Sized,

Implementors§

Source§

impl<T> IntoComplex<T> for T
where T: Num,