Crates.io | complexible |
lib.rs | complexible |
version | 0.2.4 |
source | src |
created_at | 2023-04-22 23:10:03.972363 |
updated_at | 2023-04-24 20:25:03.708791 |
description | A minimal and user-friendly Rust library complex-number operations, bringing the joy of complex mathematics to Rustaceans everywhere! |
homepage | |
repository | https://github.com/kevmasajedi/complexible |
max_upload_size | |
id | 846226 |
size | 34,607 |
Complexible is a minimal and user-friendly Rust library for complex-number operations, bringing the joy of complex mathematics to Rustaceans everywhere! Designed with simplicity and ease-of-use in mind, Complexible offers a range of functionality to help you work with complex numbers in your Rust projects.
CartesianComplexNumber
) and polar (PolarComplexNumber
) formsAngle
, Radian
, and Degree
structscargo add complexible
Here's a quick example to get you started:
use complexible::complex_numbers::*;
fn main() {
let a = ComplexNumber::from_cartesian(3.0, 4.0);
let angle = Angle::from_radians(0.927);
let b = ComplexNumber::from_polar(5.0, angle);
let sum = a.add(&b);
let product = a.mul(&b);
println!("Sum: {}", sum);
println!("Product: {}", product);
}
For more examples and detailed documentation, please refer to the API documentation.
To get a quick tour of complex numbers and the functions of this library, you can refer to this section of DSP for All library.
We welcome contributions! If you'd like to help improve Complexible, feel free to submit a pull request on GitHub. Please make sure to follow the existing coding style and add tests for any new features or bug fixes.
Complexible is released under the MIT license.