[][src]Struct shigens::Quaternion

pub struct Quaternion<T> {
    pub r: R<T>,
    pub i: I<T>,
    pub j: J<T>,
    pub k: K<T>,
}

Fields

r: R<T>i: I<T>j: J<T>k: K<T>

Implementations

impl<T> Quaternion<T>[src]

pub fn get_values(self) -> (T, T, T, T)[src]

impl<T> Quaternion<T> where
    T: Copy + Neg<Output = T>, 
[src]

pub fn rev(&self) -> Quaternion<T>[src]

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

pub fn norm_square(&self) -> R<T::Output>[src]

impl<T> Quaternion<T> where
    T: Copy + Add<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T>, 
[src]

pub fn inv(&self) -> Quaternion<T>[src]

impl<T> Quaternion<T>[src]

pub fn scalar(self) -> R<T>[src]

pub fn vector(self) -> (I<T>, J<T>, K<T>)[src]

Trait Implementations

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

impl<LT, RT> Add<Quaternion<RT>> for Quaternion<LT> where
    LT: Add<RT>, 
[src]

type Output = Quaternion<LT::Output>

The resulting type after applying the + operator.

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

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

type Output = Quaternion<T>

The resulting type after applying the + operator.

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

impl<T: Debug> Debug for Quaternion<T>[src]

impl<T: Display> Display for Quaternion<T>[src]

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

type Output = Quaternion<T>

The resulting type after applying the / operator.

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

type Output = Quaternion<T>

The resulting type after applying the / operator.

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

type Output = Quaternion<T>

The resulting type after applying the / operator.

impl<T> Div<Quaternion<T>> for R<T> where
    T: Copy + Add<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the / operator.

impl<T> Div<Quaternion<T>> for I<T> where
    T: Copy + Add<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the / operator.

impl<T> Div<Quaternion<T>> for J<T> where
    T: Copy + Add<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the / operator.

impl<T> Div<Quaternion<T>> for K<T> where
    T: Copy + Add<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the / operator.

impl<T> Div<Quaternion<T>> for Quaternion<T> where
    T: Copy + Add<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the / operator.

impl<T> Div<R<T>> for Quaternion<T> where
    T: Copy + Div
[src]

type Output = Quaternion<T::Output>

The resulting type after applying the / operator.

impl<T> From<(T, T, T, T)> for Quaternion<T>[src]

impl<T> Mul<I<T>> for Quaternion<T> where
    T: Copy + Mul<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the * operator.

impl<T> Mul<J<T>> for Quaternion<T> where
    T: Copy + Mul<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the * operator.

impl<T> Mul<K<T>> for Quaternion<T> where
    T: Copy + Mul<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the * operator.

impl<LT, RT> Mul<Quaternion<RT>> for Quaternion<LT> where
    LT: Copy + Mul<RT>,
    RT: Copy,
    LT::Output: Add<Output = LT::Output> + Neg<Output = LT::Output>, 
[src]

type Output = Quaternion<LT::Output>

The resulting type after applying the * operator.

impl<T> Mul<Quaternion<T>> for R<T> where
    T: Copy + Mul
[src]

type Output = Quaternion<T::Output>

The resulting type after applying the * operator.

impl<T> Mul<Quaternion<T>> for I<T> where
    T: Copy + Mul<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the * operator.

impl<T> Mul<Quaternion<T>> for J<T> where
    T: Copy + Mul<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the * operator.

impl<T> Mul<Quaternion<T>> for K<T> where
    T: Copy + Mul<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the * operator.

impl<T> Mul<R<T>> for Quaternion<T> where
    T: Copy + Mul
[src]

type Output = Quaternion<T::Output>

The resulting type after applying the * operator.

impl<T: Neg> Neg for Quaternion<T>[src]

type Output = Quaternion<T::Output>

The resulting type after applying the - operator.

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

impl<T: PartialEq> PartialEq<Quaternion<T>> for Quaternion<T>[src]

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

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

type Output = Quaternion<T>

The resulting type after applying the - operator.

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

type Output = Quaternion<T>

The resulting type after applying the - operator.

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

type Output = Quaternion<T>

The resulting type after applying the - operator.

impl<LT, RT> Sub<Quaternion<RT>> for Quaternion<LT> where
    LT: Sub<RT>, 
[src]

type Output = Quaternion<LT::Output>

The resulting type after applying the - operator.

impl<T> Sub<Quaternion<T>> for R<T> where
    T: Sub<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the - operator.

impl<T> Sub<Quaternion<T>> for I<T> where
    T: Sub<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the - operator.

impl<T> Sub<Quaternion<T>> for J<T> where
    T: Sub<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the - operator.

impl<T> Sub<Quaternion<T>> for K<T> where
    T: Sub<Output = T> + Neg<Output = T>, 
[src]

type Output = Quaternion<T>

The resulting type after applying the - operator.

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

type Output = Quaternion<T>

The resulting type after applying the - operator.

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

Auto Trait Implementations

impl<T> RefUnwindSafe for Quaternion<T> where
    T: RefUnwindSafe

impl<T> Send for Quaternion<T> where
    T: Send

impl<T> Sync for Quaternion<T> where
    T: Sync

impl<T> Unpin for Quaternion<T> where
    T: Unpin

impl<T> UnwindSafe for Quaternion<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> 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.