Struct vecmat::Complex [−][src]
Complex number.
Implementations
impl<T> Complex<T>
[src]
pub fn new(w: T, x: T) -> Self
[src]
pub fn from_vector(vec: Vector2<T>) -> Self
[src]
pub fn from_array(arr: [T; 2]) -> Self
[src]
pub fn from_tuple(tup: (T, T)) -> Self
[src]
pub fn from_num(nc: NumComplex<T>) -> Self
[src]
pub fn into_vector(self) -> Vector2<T>
[src]
pub fn into_array(self) -> [T; 2]
[src]
pub fn into_tuple(self) -> (T, T)
[src]
pub fn into_num(self) -> NumComplex<T>
[src]
impl<T: Copy> Complex<T>
[src]
impl<T> Complex<T>
[src]
pub fn re_ref(&self) -> &T
[src]
pub fn im_ref(&self) -> &T
[src]
pub fn re_mut(&mut self) -> &mut T
[src]
pub fn im_mut(&mut self) -> &mut T
[src]
impl<T> Complex<T> where
T: Neg<Output = T> + Copy,
[src]
T: Neg<Output = T> + Copy,
pub fn into_matrix(self) -> Matrix2x2<T>
[src]
impl<T> Complex<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
impl<T> Complex<T> where
T: Zero + One,
[src]
T: Zero + One,
impl<T> Complex<T> where
T: Add<Output = T> + Mul<Output = T> + Copy,
[src]
T: Add<Output = T> + Mul<Output = T> + Copy,
impl<T: Float> Complex<T>
[src]
pub fn norm(self) -> T
[src]
pub fn arg(self) -> T
[src]
pub fn to_polar(self) -> (T, T)
[src]
pub fn from_polar(r: T, theta: T) -> Self
[src]
impl<T> Complex<T> where
T: Float,
[src]
T: Float,
impl<T> Complex<T> where
T: Neg<Output = T> + Num + Copy,
[src]
T: Neg<Output = T> + Num + Copy,
impl<T: Num + Copy> Complex<T>
[src]
impl<T: Neg<Output = T> + Num + Copy> Complex<T>
[src]
impl<T: Float> Complex<T>
[src]
pub fn exp(self) -> Self
[src]
pub fn ln(self) -> Self
[src]
pub fn sqrt(self) -> Self
[src]
pub fn cbrt(self) -> Self
[src]
pub fn powf(self, exp: T) -> Self
[src]
pub fn log(self, base: T) -> Self
[src]
pub fn powc(self, exp: Self) -> Self
[src]
pub fn expf(self, base: T) -> Self
[src]
pub fn sin(self) -> Self
[src]
pub fn cos(self) -> Self
[src]
pub fn tan(self) -> Self
[src]
pub fn asin(self) -> Self
[src]
pub fn acos(self) -> Self
[src]
pub fn atan(self) -> Self
[src]
pub fn sinh(self) -> Self
[src]
pub fn cosh(self) -> Self
[src]
pub fn tanh(self) -> Self
[src]
pub fn asinh(self) -> Self
[src]
pub fn acosh(self) -> Self
[src]
pub fn atanh(self) -> Self
[src]
pub fn finv(self) -> Self
[src]
pub fn fdiv(self, other: Self) -> Self
[src]
Trait Implementations
impl<T> AbsDiffEq<Complex<T>> for Complex<T> where
T: AbsDiffEq<Epsilon = T> + Copy,
[src]
T: AbsDiffEq<Epsilon = T> + Copy,
type Epsilon = T
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]
pub fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
impl<T> Add<Complex<T>> for Complex<T> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl<T> Add<Complex<T>> for Quaternion<T> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Complex<T>) -> Self
[src]
impl Add<Quaternion<f32>> for Complex<f32>
[src]
Workaround for reverse addition.
type Output = Quaternion<f32>
The resulting type after applying the +
operator.
fn add(self, other: Quaternion<f32>) -> Self::Output
[src]
impl Add<Quaternion<f64>> for Complex<f64>
[src]
Workaround for reverse addition.
type Output = Quaternion<f64>
The resulting type after applying the +
operator.
fn add(self, other: Quaternion<f64>) -> Self::Output
[src]
impl<T> Add<T> for Complex<T> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: T) -> Self
[src]
impl<T> AddAssign<Complex<T>> for Complex<T> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: Self)
[src]
impl<T> AddAssign<Complex<T>> for Quaternion<T> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: Complex<T>)
[src]
impl<T> AddAssign<T> for Complex<T> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: T)
[src]
impl<T: Clone> Clone for Complex<T>
[src]
impl<T> Conj for Complex<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
impl<T: Copy> Copy for Complex<T>
[src]
impl<T: Debug> Debug for Complex<T>
[src]
impl<T: Display> Display for Complex<T>
[src]
impl<T> Distribution<Complex<T>> for Normal where
Normal: Distribution<Vector<T, 2>>,
[src]
Normal: Distribution<Vector<T, 2>>,
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Complex<T>
[src]
pub fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl<T: Float> Distribution<Complex<T>> for NonZero where
NonZero: Distribution<Vector<T, 2>>,
[src]
NonZero: Distribution<Vector<T, 2>>,
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Complex<T>
[src]
pub fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl<T: Float> Distribution<Complex<T>> for Unit where
Unit: Distribution<Vector<T, 2>>,
[src]
Unit: Distribution<Vector<T, 2>>,
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Complex<T>
[src]
pub fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl<T> Div<Complex<T>> for Complex<T> where
T: Neg<Output = T> + Num + Copy,
[src]
T: Neg<Output = T> + Num + Copy,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl<T> Div<Complex<T>> for Quaternion<T> where
T: Neg<Output = T> + Num + Copy,
[src]
T: Neg<Output = T> + Num + Copy,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Complex<T>) -> Self
[src]
impl<T> Div<Quaternion<T>> for Complex<T> where
T: Neg<Output = T> + Num + Copy,
[src]
T: Neg<Output = T> + Num + Copy,
type Output = Quaternion<T>
The resulting type after applying the /
operator.
fn div(self, other: Quaternion<T>) -> Self::Output
[src]
impl<T> Div<T> for Complex<T> where
T: Div<Output = T> + Copy,
[src]
T: Div<Output = T> + Copy,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: T) -> Self
[src]
impl<T> DivAssign<Complex<T>> for Complex<T> where
Self: Div<Output = Self> + Copy,
[src]
Self: Div<Output = Self> + Copy,
fn div_assign(&mut self, other: Self)
[src]
impl<T> DivAssign<Complex<T>> for Quaternion<T> where
Self: Div<Complex<T>, Output = Self> + Copy,
[src]
Self: Div<Complex<T>, Output = Self> + Copy,
fn div_assign(&mut self, other: Complex<T>)
[src]
impl<T> DivAssign<T> for Complex<T> where
Self: Div<T, Output = Self> + Copy,
[src]
Self: Div<T, Output = Self> + Copy,
fn div_assign(&mut self, other: T)
[src]
impl<T> Dot<Complex<T>> for Complex<T> where
T: Add<Output = T> + Mul<Output = T>,
[src]
T: Add<Output = T> + Mul<Output = T>,
impl<T> From<[T; 2]> for Complex<T>
[src]
impl<T> From<(T, T)> for Complex<T>
[src]
impl<T> From<Complex<T>> for Vector2<T>
[src]
impl<T> From<Complex<T>> for Complex<T>
[src]
fn from(nc: NumComplex<T>) -> Self
[src]
impl<T> From<Complex<T>> for Rotation2<T>
[src]
impl<T> From<Rotation2<T>> for Complex<T>
[src]
impl<T> From<Vector<T, 2_usize>> for Complex<T>
[src]
impl<T> Mul<Complex<T>> for Complex<T> where
T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy,
[src]
T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl<T> Mul<Complex<T>> for Quaternion<T> where
T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy,
[src]
T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Complex<T>) -> Self
[src]
impl<T> Mul<Quaternion<T>> for Complex<T> where
T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy,
[src]
T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy,
type Output = Quaternion<T>
The resulting type after applying the *
operator.
fn mul(self, other: Quaternion<T>) -> Self::Output
[src]
impl<T> Mul<T> for Complex<T> where
T: Mul<Output = T> + Copy,
[src]
T: Mul<Output = T> + Copy,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Self
[src]
impl<T> MulAssign<Complex<T>> for Complex<T> where
Self: Mul<Output = Self> + Copy,
[src]
Self: Mul<Output = Self> + Copy,
fn mul_assign(&mut self, other: Self)
[src]
impl<T> MulAssign<Complex<T>> for Quaternion<T> where
Self: Mul<Complex<T>, Output = Self> + Copy,
[src]
Self: Mul<Complex<T>, Output = Self> + Copy,
fn mul_assign(&mut self, other: Complex<T>)
[src]
impl<T> MulAssign<T> for Complex<T> where
Self: Mul<T, Output = Self> + Copy,
[src]
Self: Mul<T, Output = Self> + Copy,
fn mul_assign(&mut self, other: T)
[src]
impl<T> Neg for Complex<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
impl<T> NormL1 for Complex<T> where
Vector2<T>: NormL1<Output = T>,
[src]
Vector2<T>: NormL1<Output = T>,
impl<T: Float> NormL2 for Complex<T>
[src]
impl<T: Neg<Output = T> + Num + Copy> Num for Complex<T>
[src]
type FromStrRadixErr = ParseComplexError<T::FromStrRadixErr>
fn from_str_radix(s: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
[src]
impl<T> One for Complex<T> where
T: Zero + One + Sub<Output = T> + Copy,
[src]
T: Zero + One + Sub<Output = T> + Copy,
fn one() -> Self
[src]
pub fn set_one(&mut self)
[src]
pub fn is_one(&self) -> bool where
Self: PartialEq<Self>,
[src]
Self: PartialEq<Self>,
impl<T: PartialEq> PartialEq<Complex<T>> for Complex<T>
[src]
impl<T: Neg<Output = T> + Num + Copy> Rem<Complex<T>> for Complex<T>
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self
[src]
impl<T> StructuralPartialEq for Complex<T>
[src]
impl<T> Sub<Complex<T>> for Complex<T> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl<T> Sub<Complex<T>> for Quaternion<T> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Complex<T>) -> Self
[src]
impl Sub<Quaternion<f32>> for Complex<f32>
[src]
Workaround for reverse subtraction.
type Output = Quaternion<f32>
The resulting type after applying the -
operator.
fn sub(self, other: Quaternion<f32>) -> Self::Output
[src]
impl Sub<Quaternion<f64>> for Complex<f64>
[src]
Workaround for reverse subtraction.
type Output = Quaternion<f64>
The resulting type after applying the -
operator.
fn sub(self, other: Quaternion<f64>) -> Self::Output
[src]
impl<T> Sub<T> for Complex<T> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Self
[src]
impl<T> SubAssign<Complex<T>> for Complex<T> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: Self)
[src]
impl<T> SubAssign<Complex<T>> for Quaternion<T> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: Complex<T>)
[src]
impl<T> SubAssign<T> for Complex<T> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: T)
[src]
impl<T> Zero for Complex<T> where
T: Zero,
[src]
T: Zero,
Auto Trait Implementations
impl<T> RefUnwindSafe for Complex<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Complex<T> where
T: Send,
T: Send,
impl<T> Sync for Complex<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Complex<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Complex<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<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>,