Function au::complex::damp [−][src]
pub fn damp<T: Float>(c: Complex<T>) -> T
Calculate the damping of a complex number, it corresponds to the cosine of the angle between the segment joining the complex number to the origin and the real negative semiaxis.
By definition the damping of 0+0i is -1.
Arguments
c
- Complex number
Example
use au::{num_complex::Complex, damp}; let i = Complex::new(0., 1.); assert_eq!(0., damp(i));