// Complex number type — re-exported from dreamwell-math.
// Eliminates duplicate type. Enables linalg/eigen/matrix_exp interop.
pub use dreamwell_math::Complex;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn complex_mul() {
let a = Complex::new(1.0, 2.0);
let b = Complex::new(3.0, 4.0);
let c = a.mul(b);
assert!((c.re - (-5.0)).abs() < 1e-6);
assert!((c.im - 10.0).abs() < 1e-6);
}
#[test]
fn complex_conj_norm() {
let a = Complex::new(3.0, 4.0);
assert!((a.norm() - 5.0).abs() < 1e-6);
let c = a.conj();
assert_eq!(c.re, 3.0);
assert_eq!(c.im, -4.0);
}
}