Struct ohsl::complex::Complex [−][src]
Fields
real: T
Real part of the complex number
imag: T
Imaginary part of the complex number
Implementations
impl<T> Complex<T>
[src]
impl<T: Clone + Signed> Complex<T>
[src]
impl<T: Clone + Number> Complex<T>
[src]
impl Complex<f64>
[src]
impl Complex<f64>
[src]
Trait Implementations
impl<T: Clone + Number> Add<Complex<T>> for Complex<T>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, plus: Self) -> Self::Output
[src]
Add two complex numbers together ( binary + ) ( a + ib ) + ( c + id ) = ( a + c ) + i( b + d )
impl<T: Number> Add<T> for Complex<T>
[src]
type Output = Complex<T>
The resulting type after applying the +
operator.
fn add(self, plus: T) -> Self::Output
[src]
Add a complex number to a real number ( a + ib ) + c = ( a + c ) + ib
impl<T: Number> AddAssign<Complex<T>> for Complex<T>
[src]
fn add_assign(&mut self, rhs: Self)
[src]
Add a complex number to a mutable complex variable and assign the result to that variable ( += )
impl<T: Number> AddAssign<T> for Complex<T>
[src]
fn add_assign(&mut self, rhs: T)
[src]
Add a real number to a mutable complex variable and assign the result to that variable ( += )
impl<T: Clone> Clone for Complex<T>
[src]
fn clone(&self) -> Self
[src]
Clone the complex number
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Complex<f64>
[src]
impl<T> Debug for Complex<T> where
T: Debug,
[src]
T: Debug,
impl<T> Display for Complex<T> where
T: Display,
[src]
T: Display,
impl<T: Clone + Number> Div<Complex<T>> for Complex<T>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, divisor: Self) -> Self::Output
[src]
Divide one complex number by another ( binary / ) ( a + ib ) / ( c + id ) = [( ac + bd ) + i( bc - ad )] / ( c^2 + d^2 )
impl<T: Clone + Number> Div<T> for Complex<T>
[src]
type Output = Complex<T>
The resulting type after applying the /
operator.
fn div(self, scalar: T) -> Self::Output
[src]
Divide a complex number by a real scalar ( a + ib ) / r = (a/r) + i(b/r)
impl<T: Clone + Number> DivAssign<Complex<T>> for Complex<T>
[src]
fn div_assign(&mut self, rhs: Self)
[src]
Divide a mutable complex variable by a complex number and assign the result to that variable ( *= )
impl<T: Clone + Number> DivAssign<T> for Complex<T>
[src]
fn div_assign(&mut self, rhs: T)
[src]
Divide a mutable complex variable by a real number and assign the result to that variable ( /= )
impl<T: Clone + Number> Mul<Complex<T>> for Complex<T>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, times: Self) -> Self::Output
[src]
Multiply two complex numbers together ( binary * ) ( a + ib ) * ( c + id ) = ( ac - bd ) + i( ad + bc )
impl<T: Clone + Number> Mul<T> for Complex<T>
[src]
type Output = Complex<T>
The resulting type after applying the *
operator.
fn mul(self, scalar: T) -> Self::Output
[src]
Multiply a complex number by a real scalar ( a + ib ) * r = (ar) + i(br)
impl<T: Clone + Number> MulAssign<Complex<T>> for Complex<T>
[src]
fn mul_assign(&mut self, rhs: Self)
[src]
Multipy a mutable complex variable by a complex number and assign the result to that variable ( *= )
impl<T: Clone + Number> MulAssign<T> for Complex<T>
[src]
fn mul_assign(&mut self, rhs: T)
[src]
Multiply a mutable complex variable by a real number and assign the result to that variable ( *= )
impl<T: Clone + Signed> Neg for Complex<T>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Return the unary negation ( unary - )
- ( a + ib ) = -a - ib
impl<T: Number + Clone> Number for Complex<T>
[src]
impl<T: Clone + Number> One for Complex<T>
[src]
impl<T: Clone + Number> PartialEq<Complex<T>> for Complex<T>
[src]
fn eq(&self, other: &Complex<T>) -> bool
[src]
Implement trait for equality
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: Clone + Number + PartialOrd> PartialOrd<Complex<T>> for Complex<T>
[src]
fn partial_cmp(&self, other: &Complex<T>) -> Option<Ordering>
[src]
Implement trait for ordering
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Signed for Complex<f64>
[src]
impl<T: Clone + Number> Sub<Complex<T>> for Complex<T>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, minus: Self) -> Self::Output
[src]
Subtract one complex number from another ( binary - ) ( a + ib ) - ( c + id ) = ( a - c ) + i( b - d )
impl<T: Number> Sub<T> for Complex<T>
[src]
type Output = Complex<T>
The resulting type after applying the -
operator.
fn sub(self, minus: T) -> Self::Output
[src]
Subtract a real number from a complex number ( a + ib ) - c = ( a - c ) + ib
impl<T: Number> SubAssign<Complex<T>> for Complex<T>
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
Subtract a complex number from a mutable complex variable and assign the result to that variable ( -= )
impl<T: Number> SubAssign<T> for Complex<T>
[src]
fn sub_assign(&mut self, rhs: T)
[src]
Subtract a real number from a mutable complex variable and assign the result to that variable ( += )
impl<T: Clone + Number> Zero for Complex<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Complex<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Complex<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Complex<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Complex<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Complex<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, Rhs> AssignOperations<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Rhs, Output> Operations<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,