pub struct Complex<T> { /* private fields */ }Implementations§
Source§impl<T> Complex<T>
impl<T> Complex<T>
pub const fn new(re: T, im: T) -> Self
pub fn real(&self) -> &T
pub fn imaginary(&self) -> &T
pub fn into_parts(self) -> (T, T)
pub fn real_value(self) -> Twhere
T: Copy,
pub fn imaginary_value(self) -> Twhere
T: Copy,
pub fn set_real(&mut self, value: T)
pub fn set_imaginary(&mut self, value: T)
Source§impl<T> Complex<T>
impl<T> Complex<T>
pub fn norm_squared(self) -> T
Trait Implementations§
Source§impl<T> AddAssign for Complex<T>where
T: AddAssign,
impl<T> AddAssign for Complex<T>where
T: AddAssign,
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl<T: Copy> Copy for Complex<T>
Source§impl<T> DivAssign for Complex<T>
impl<T> DivAssign for Complex<T>
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl<T> MulAssign for Complex<T>
impl<T> MulAssign for Complex<T>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreimpl<T: PartialEq> 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> UnsafeUnpin for Complex<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Complex<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more