pub struct Complex<T: Float> { /* private fields */ }Expand description
Struct representing a complex number
Implementations§
Source§impl<T: Float> Complex<T>
impl<T: Float> Complex<T>
Sourcepub fn square_abs(self) -> T
pub fn square_abs(self) -> T
Returns the square of the absolute value of this Complex.
Sourcepub fn powi(self, exponent: i64) -> Self
pub fn powi(self, exponent: i64) -> Self
Returns this Complex raised to a power using repeated multiplication.
Trait Implementations§
Source§impl<T: Float> AddAssign<T> for Complex<T>
Complex += T
impl<T: Float> AddAssign<T> for Complex<T>
Complex
Source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the
+= operation. Read moreSource§impl<T: Float> AddAssign for Complex<T>
Complex += Complex
impl<T: Float> AddAssign for Complex<T>
Complex
Source§fn add_assign(&mut self, rhs: Complex<T>)
fn add_assign(&mut self, rhs: Complex<T>)
Performs the
+= operation. Read moreSource§impl<T: Float> DivAssign<T> for Complex<T>
Complex /= T
impl<T: Float> DivAssign<T> for Complex<T>
Complex
Source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/= operation. Read moreSource§impl<T: Float> DivAssign for Complex<T>
Complex /= Complex
impl<T: Float> DivAssign for Complex<T>
Complex
Source§fn div_assign(&mut self, rhs: Complex<T>)
fn div_assign(&mut self, rhs: Complex<T>)
Performs the
/= operation. Read moreSource§impl<T: Float> MulAssign<T> for Complex<T>
Complex *= T
impl<T: Float> MulAssign<T> for Complex<T>
Complex
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*= operation. Read moreSource§impl<T: Float> MulAssign for Complex<T>
Complex *= Complex
impl<T: Float> MulAssign for Complex<T>
Complex
Source§fn mul_assign(&mut self, rhs: Complex<T>)
fn mul_assign(&mut self, rhs: Complex<T>)
Performs the
*= operation. Read moreSource§impl<T: Float> SubAssign<T> for Complex<T>
Complex -= T
impl<T: Float> SubAssign<T> for Complex<T>
Complex
Source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
Performs the
-= operation. Read moreSource§impl<T: Float> SubAssign for Complex<T>
Complex -= Complex
impl<T: Float> SubAssign for Complex<T>
Complex
Source§fn sub_assign(&mut self, rhs: Complex<T>)
fn sub_assign(&mut self, rhs: Complex<T>)
Performs the
-= operation. Read moreimpl<T: Copy + Float> Copy for Complex<T>
impl<T: Float> StructuralPartialEq for Complex<T>
Auto Trait Implementations§
impl<T> Freeze for Complex<T>where
T: Freeze,
impl<T> RefUnwindSafe for Complex<T>where
T: RefUnwindSafe,
impl<T> Send for Complex<T>where
T: Send,
impl<T> Sync for Complex<T>where
T: Sync,
impl<T> Unpin for Complex<T>where
T: Unpin,
impl<T> UnwindSafe for Complex<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)