mod traits;
mod construct;
mod second_order;
mod math;
mod specific;
pub mod format;
#[cfg(feature = "random")]
pub mod random;
#[cfg(feature = "approx")]
pub mod approx;
#[cfg(all(test, feature = "random", feature = "approx"))]
mod tests;
use num_complex::{Complex as NumComplex};
pub use traits::{Conj, Dot, NormSqr, Norm, NormL1, Algebra};
pub use construct::{Construct};
pub type Complex<T> = Construct<T, T>;
pub type Quaternion<T> = Construct<T, Complex<T>>;
pub type Octonion<T> = Construct<T, Quaternion<T>>;
pub type Sedenion<T> = Construct<T, Octonion<T>>;
impl<T> From<NumComplex<T>> for Complex<T> {
fn from(other: NumComplex<T>) -> Self {
Self::new(other.re, other.im)
}
}
impl<T> Into<NumComplex<T>> for Complex<T> {
fn into(self) -> NumComplex<T> {
let (re, im) = self.split();
NumComplex { re, im }
}
}