Skip to main content

ComplexMut

Trait ComplexMut 

Source
pub trait ComplexMut: Complex {
    // Required methods
    fn set_real(&mut self, value: Precision);
    fn set_imag(&mut self, value: Precision);

    // Provided methods
    fn set<C: Complex>(&mut self, value: &C) { ... }
    fn mul<C: Complex>(&mut self, value: &C) { ... }
    fn scale(&mut self, value: Precision) { ... }
    fn div<C: Complex>(&mut self, value: &C) { ... }
    fn unscale(&mut self, value: Precision) { ... }
}
Expand description

Trait representing mutable complex numbers.

Required Methods§

Source

fn set_real(&mut self, value: Precision)

Sets the real part.

Source

fn set_imag(&mut self, value: Precision)

Sets the imaginary part.

Provided Methods§

Source

fn set<C: Complex>(&mut self, value: &C)

Sets the real and imaginary part from another Complex.

Source

fn mul<C: Complex>(&mut self, value: &C)

Multiplies in-place with another Complex.

Source

fn scale(&mut self, value: Precision)

Scales in-place.

Source

fn div<C: Complex>(&mut self, value: &C)

Divides in-place with another Complex.

Source

fn unscale(&mut self, value: Precision)

Unscales in-place.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ComplexMut for Complex<f32>

Source§

fn set_real(&mut self, value: Precision)

Source§

fn set_imag(&mut self, value: Precision)

Source§

impl ComplexMut for Complex<f64>

Source§

fn set_real(&mut self, value: Precision)

Source§

fn set_imag(&mut self, value: Precision)

Implementors§