easy-complex
easy-complex is a no-dependencies crate that provides easy to use complex number operations and provides an explicit cast for all numeric types in the standard library.
If you have any issues, please report them here
Features
- Explicit cast from integers, unsigned integers and floats to Exponential Complex Number (ExpComplex).
- Easy operations with overloaded standard operators.
- A custom Display trait implementation that prints in either exponential form or coordinate form.
- Compatibility with the num-traits crate through the feature "num_complex_compatibility".
Installation
easy complex doesn't have any dependencies except the standard library.
Just add to your Cargo.toml
[dependencies]
easy_complex = "0.3.4"
If you don't use or want to use cargo, the crate can be found in this crates.io page
Versions before 0.3.1 have some errors, misspells and/or overcomplicated ways, their use is not recommended.
Usage
For extensive explanation and usage go to the wiki where the full usage is demonstrated
To use the complex numbers do
use easy_complex::{EComplex, Complex};
To use the explicit conversion do
use easy_complex::ContainedInComplex;
This is based on the Real domain, which is contained within the Complex domain in Math
Warning!!! Values near zero may diverge in the argument if used in ExpComplex form
TODO
- Extend compatibility
- Add more examples and tests
- Some advanced functions on the complex domain (C)
- Clean up and more extensive documentation
- Create a parser
LICENSE
Apache License 2.0