macro_rules! complex { () => { ... }; ($re:expr, $im: expr) => { ... }; }
Expand description
A more convenient way to write Complex::new(...)
.
Examples
use rust_poly::complex;
use num_complex::Complex;
let c1: Complex<f32> = complex!();
let c2 = Complex::new(0.0, 0.0);
let c3 = complex!(1.0f32, 2.0);
let c4 = Complex::new(1.0, 2.0);
assert_eq!(c1, c2);
assert_eq!(c3, c4);