Installation
Run this in your terminal
OR add this to your Cargo.toml
:
[]
= "0.1.0"
Features
Complex Numbers
Comprehensive support for complex arithmetic, mathematical functions, and polar form conversions
Example
use Complex;
// Create complex numbers
let z1 = new;
let z2 = from_polar;
// Basic arithmetic
let sum = z1 + z2;
let product = z1 * z2;
// Advanced operations
let magnitude = z1.magnitude;
let argument = z1.argument;
let conjugate = z1.conjugate;
Complex Vectors
Powerful vector operations for complex numbers, including inner products, norms, and normalization
use ;
// Create complex vectors
let v1 = new;
let v2 = new;
// Vector operations
let sum = v1.clone + v2.clone;
let scaled = v1.clone * 2.0;
// Inner product and norm
let inner_prod = v1.inner_product;
let norm = v1.norm;
// Normalize a vector
let normalized = v1.normalize;
License
This project is licensed under the MIT License - see the LICENSE file for details.