I’m making a toy numerical crate, and some of my return types are complex numbers. I’m relying on num-complex
under the hood, but my return types are also complex numbers. I considered simply returning tuples of f64
values, but that doesn’t feel right.
If you were using a crate, how would you want to see this done? I hate to force anyone to include a dependency they don’t want—even one as well-maintained as num-complex
. Is it alright to pub use
the complex type, or is there a more acceptable way?
Thanks for your time!
pub use num_complex::Complex64;
// and return a Complex64 value...
or
use num_complex::Complex64;
// and return a tuple of `f64`?
Ethan Barry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.