rust-num / num-complex

Complex numbers for Rust
Apache License 2.0
232 stars 50 forks source link

Feature Request: abs() #38

Closed ryn1x closed 5 years ago

ryn1x commented 5 years ago

It would be nice to have an abs() method that returns the complex magnitude.

cuviper commented 5 years ago

I believe what you want is norm(): https://docs.rs/num-complex/0.2.1/num_complex/struct.Complex.html#method.norm

ryn1x commented 5 years ago

Ah, look at that. I was just used to the R and Matlab terms. Thanks!