Struct dvec::Complex
[−]
[src]
pub struct Complex<T> { pub a: T, pub b: T, }
Complex number with form (a + bi)
.
Fields
a: T
b: T
Methods
impl<T> Complex<T>
[src]
Trait Implementations
impl<T: Clone> Clone for Complex<T>
[src]
fn clone(&self) -> Complex<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for Complex<T>
[src]
impl<T: Debug> Debug for Complex<T>
[src]
impl<T: Default> Default for Complex<T>
[src]
impl<T: Eq> Eq for Complex<T>
[src]
impl<T: Hash> Hash for Complex<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: PartialEq> PartialEq for Complex<T>
[src]
fn eq(&self, __arg_0: &Complex<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Complex<T>) -> bool
This method tests for !=
.
impl<T> Add for Complex<T> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Complex<T>
The resulting type after applying the +
operator
fn add(self, rhs: Complex<T>) -> Complex<T>
The method for the +
operator
impl<T> From<T> for Complex<T> where
T: Zero,
[src]
T: Zero,
impl<T> From<(T, T)> for Complex<T>
[src]
impl<T> From<Vec2<T>> for Complex<T>
[src]
impl<T> Mul for Complex<T> where
T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>,
[src]
T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>,
type Output = Complex<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Complex<T>) -> Complex<T>
The method for the *
operator
impl<T> Sub for Complex<T> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,