pub trait AsComplex<T> {
type Complex: ComplexNum<T>;
// Required method
fn as_complex(&self, real: bool) -> Self::Complex;
// Provided methods
fn as_re(&self) -> Self::Complex { ... }
fn as_im(&self) -> Self::Complex { ... }
}Expand description
Trait for converting a type into a complex number.