pub struct ComplexNum<T: Num + Copy> { /* private fields */ }Implementations§
Source§impl<T> ComplexNum<T>
impl<T> ComplexNum<T>
pub fn new(real: T, imaginary: T) -> Self
pub fn conjugate(self) -> Self
pub fn as_tuple(self) -> (T, T)
pub fn from_polar(polar: ComplexPolar<T>) -> Option<Self>
pub fn as_polar(&self) -> Option<ComplexPolar<T>>
Trait Implementations§
Source§impl<T> Add for ComplexNum<T>
impl<T> Add for ComplexNum<T>
Source§impl<T> Div for ComplexNum<T>
impl<T> Div for ComplexNum<T>
Source§impl<T> Mul for ComplexNum<T>
impl<T> Mul for ComplexNum<T>
Auto Trait Implementations§
impl<T> Freeze for ComplexNum<T>where
T: Freeze,
impl<T> RefUnwindSafe for ComplexNum<T>where
T: RefUnwindSafe,
impl<T> Send for ComplexNum<T>where
T: Send,
impl<T> Sync for ComplexNum<T>where
T: Sync,
impl<T> Unpin for ComplexNum<T>where
T: Unpin,
impl<T> UnsafeUnpin for ComplexNum<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ComplexNum<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