Struct vecmat::Complex[][src]

#[repr(transparent)]pub struct Complex<T> { /* fields omitted */ }

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]

pub fn re(&self) -> T[src]

pub fn im(&self) -> 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]

pub fn into_matrix(self) -> Matrix2x2<T>[src]

impl<T> Complex<T> where
    T: Neg<Output = T>, 
[src]

pub fn conj(self) -> Self[src]

impl<T> Complex<T> where
    T: Zero + One
[src]

pub fn i() -> Self[src]

impl<T> Complex<T> where
    T: Add<Output = T> + Mul<Output = T> + Copy
[src]

pub fn norm_sqr(self) -> T[src]

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]

pub fn normalize(self) -> Self[src]

impl<T> Complex<T> where
    T: Neg<Output = T> + Num + Copy
[src]

pub fn inv(self) -> Self[src]

impl<T: Num + Copy> Complex<T>[src]

pub fn powu(&self, exp: u32) -> Self[src]

impl<T: Neg<Output = T> + Num + Copy> Complex<T>[src]

pub fn powi(&self, exp: i32) -> Self[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]

type Epsilon = T

Used for specifying relative comparisons.

impl<T> Add<Complex<T>> for Complex<T> where
    T: Add<Output = T>, 
[src]

type Output = Self

The resulting type after applying the + operator.

impl<T> Add<Complex<T>> for Quaternion<T> where
    T: Add<Output = T>, 
[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Quaternion<f32>> for Complex<f32>[src]

Workaround for reverse addition.

type Output = Quaternion<f32>

The resulting type after applying the + operator.

impl Add<Quaternion<f64>> for Complex<f64>[src]

Workaround for reverse addition.

type Output = Quaternion<f64>

The resulting type after applying the + operator.

impl<T> Add<T> for Complex<T> where
    T: Add<Output = T>, 
[src]

type Output = Self

The resulting type after applying the + operator.

impl<T> AddAssign<Complex<T>> for Complex<T> where
    T: AddAssign
[src]

impl<T> AddAssign<Complex<T>> for Quaternion<T> where
    T: AddAssign
[src]

impl<T> AddAssign<T> for Complex<T> where
    T: AddAssign
[src]

impl<T: Clone> Clone for Complex<T>[src]

impl<T> Conj for Complex<T> where
    T: Neg<Output = T>, 
[src]

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]

impl<T: Float> Distribution<Complex<T>> for NonZero where
    NonZero: Distribution<Vector<T, 2>>, 
[src]

impl<T: Float> Distribution<Complex<T>> for Unit where
    Unit: Distribution<Vector<T, 2>>, 
[src]

impl<T> Div<Complex<T>> for Complex<T> where
    T: Neg<Output = T> + Num + Copy
[src]

type Output = Self

The resulting type after applying the / operator.

impl<T> Div<Complex<T>> for Quaternion<T> where
    T: Neg<Output = T> + Num + Copy
[src]

type Output = Self

The resulting type after applying the / operator.

impl<T> Div<Quaternion<T>> for Complex<T> where
    T: Neg<Output = T> + Num + Copy
[src]

type Output = Quaternion<T>

The resulting type after applying the / operator.

impl<T> Div<T> for Complex<T> where
    T: Div<Output = T> + Copy
[src]

type Output = Self

The resulting type after applying the / operator.

impl<T> DivAssign<Complex<T>> for Complex<T> where
    Self: Div<Output = Self> + Copy
[src]

impl<T> DivAssign<Complex<T>> for Quaternion<T> where
    Self: Div<Complex<T>, Output = Self> + Copy
[src]

impl<T> DivAssign<T> for Complex<T> where
    Self: Div<T, Output = Self> + Copy
[src]

impl<T> Dot<Complex<T>> for Complex<T> where
    T: Add<Output = T> + Mul<Output = T>, 
[src]

type Output = T

Dot product output type.

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]

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]

type Output = Self

The resulting type after applying the * operator.

impl<T> Mul<Complex<T>> for Quaternion<T> where
    T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy
[src]

type Output = Self

The resulting type after applying the * operator.

impl<T> Mul<Quaternion<T>> for Complex<T> where
    T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Copy
[src]

type Output = Quaternion<T>

The resulting type after applying the * operator.

impl<T> Mul<T> for Complex<T> where
    T: Mul<Output = T> + Copy
[src]

type Output = Self

The resulting type after applying the * operator.

impl<T> MulAssign<Complex<T>> for Complex<T> where
    Self: Mul<Output = Self> + Copy
[src]

impl<T> MulAssign<Complex<T>> for Quaternion<T> where
    Self: Mul<Complex<T>, Output = Self> + Copy
[src]

impl<T> MulAssign<T> for Complex<T> where
    Self: Mul<T, Output = Self> + Copy
[src]

impl<T> Neg for Complex<T> where
    T: Neg<Output = T>, 
[src]

type Output = Self

The resulting type after applying the - operator.

impl<T> NormL1 for Complex<T> where
    Vector2<T>: NormL1<Output = T>, 
[src]

type Output = T

Type of the norm.

impl<T: Float> NormL2 for Complex<T>[src]

type Output = T

Type of the norm.

impl<T: Neg<Output = T> + Num + Copy> Num for Complex<T>[src]

type FromStrRadixErr = ParseComplexError<T::FromStrRadixErr>

impl<T> One for Complex<T> where
    T: Zero + One + Sub<Output = T> + Copy
[src]

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.

impl<T> StructuralPartialEq for Complex<T>[src]

impl<T> Sub<Complex<T>> for Complex<T> where
    T: Sub<Output = T>, 
[src]

type Output = Self

The resulting type after applying the - operator.

impl<T> Sub<Complex<T>> for Quaternion<T> where
    T: Sub<Output = T>, 
[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<Quaternion<f32>> for Complex<f32>[src]

Workaround for reverse subtraction.

type Output = Quaternion<f32>

The resulting type after applying the - operator.

impl Sub<Quaternion<f64>> for Complex<f64>[src]

Workaround for reverse subtraction.

type Output = Quaternion<f64>

The resulting type after applying the - operator.

impl<T> Sub<T> for Complex<T> where
    T: Sub<Output = T>, 
[src]

type Output = Self

The resulting type after applying the - operator.

impl<T> SubAssign<Complex<T>> for Complex<T> where
    T: SubAssign
[src]

impl<T> SubAssign<Complex<T>> for Quaternion<T> where
    T: SubAssign
[src]

impl<T> SubAssign<T> for Complex<T> where
    T: SubAssign
[src]

impl<T> Zero for Complex<T> where
    T: Zero
[src]

Auto Trait Implementations

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> UnwindSafe for Complex<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,