Struct vecmat::Quaternion [−][src]
Quaternion.
Implementations
impl<T> Quaternion<T>
[src]
pub fn new(w: T, x: T, y: T, z: T) -> Self
[src]
pub fn from_vector(vec: Vector4<T>) -> Self
[src]
pub fn from_array(arr: [T; 4]) -> Self
[src]
pub fn from_tuple(tup: (T, T, T, T)) -> Self
[src]
pub fn from_scalar_and_vector3(w: T, vec: Vector3<T>) -> Self
[src]
pub fn into_vector(self) -> Vector4<T>
[src]
pub fn into_array(self) -> [T; 4]
[src]
pub fn into_tuple(self) -> (T, T, T, T)
[src]
pub fn into_scalar_and_vector3(self) -> (T, Vector3<T>)
[src]
impl<T> Quaternion<T> where
T: Copy,
[src]
T: Copy,
pub fn w(&self) -> T
[src]
pub fn x(&self) -> T
[src]
pub fn y(&self) -> T
[src]
pub fn z(&self) -> T
[src]
pub fn xyz(&self) -> Vector3<T>
[src]
impl<T> Quaternion<T>
[src]
pub fn w_ref(&self) -> &T
[src]
pub fn x_ref(&self) -> &T
[src]
pub fn y_ref(&self) -> &T
[src]
pub fn z_ref(&self) -> &T
[src]
pub fn w_mut(&mut self) -> &mut T
[src]
pub fn x_mut(&mut self) -> &mut T
[src]
pub fn y_mut(&mut self) -> &mut T
[src]
pub fn z_mut(&mut self) -> &mut T
[src]
impl<T> Quaternion<T> where
T: Neg<Output = T> + Copy,
[src]
T: Neg<Output = T> + Copy,
pub fn into_matrix(self) -> Matrix4x4<T>
[src]
impl<T> Quaternion<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
impl<T> Quaternion<T> where
T: Zero + One,
[src]
T: Zero + One,
impl<T> Quaternion<T> where
T: Add<Output = T> + Mul<Output = T> + Copy,
[src]
T: Add<Output = T> + Mul<Output = T> + Copy,
impl<T: Float> Quaternion<T>
[src]
impl<T> Quaternion<T> where
T: Float,
[src]
T: Float,
impl<T> Quaternion<T> where
T: Neg<Output = T> + Num + Copy,
[src]
T: Neg<Output = T> + Num + Copy,
Trait Implementations
impl<T> AbsDiffEq<Quaternion<T>> for Quaternion<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 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<T> Add<Quaternion<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: Self) -> 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 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: T) -> 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<Quaternion<T>> for Quaternion<T> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: Self)
[src]
impl<T> AddAssign<T> for Quaternion<T> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: T)
[src]
impl<T: Clone> Clone for Quaternion<T>
[src]
fn clone(&self) -> Quaternion<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Conj for Quaternion<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
impl<T: Copy> Copy for Quaternion<T>
[src]
impl<T: Debug> Debug for Quaternion<T>
[src]
impl<T: Display> Display for Quaternion<T>
[src]
impl<T> Distribution<Quaternion<T>> for Normal where
Normal: Distribution<Vector<T, 4>>,
[src]
Normal: Distribution<Vector<T, 4>>,
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Quaternion<T>
[src]
pub fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl<T: Float> Distribution<Quaternion<T>> for NonZero where
NonZero: Distribution<Vector<T, 4>>,
[src]
NonZero: Distribution<Vector<T, 4>>,
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Quaternion<T>
[src]
pub fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl<T: Float> Distribution<Quaternion<T>> for Unit where
Unit: Distribution<Vector<T, 4>>,
[src]
Unit: Distribution<Vector<T, 4>>,
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Quaternion<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 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 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: Self) -> 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 Quaternion<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 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<Quaternion<T>> for Quaternion<T> where
Self: Div<Output = Self> + Copy,
[src]
Self: Div<Output = Self> + Copy,
fn div_assign(&mut self, other: Self)
[src]
impl<T> DivAssign<T> for Quaternion<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<Quaternion<T>> for Quaternion<T> where
T: Add<Output = T> + Mul<Output = T>,
[src]
T: Add<Output = T> + Mul<Output = T>,
impl<T> From<[T; 4]> for Quaternion<T>
[src]
impl<T> From<(T, T, T, T)> for Quaternion<T>
[src]
impl<T> From<(T, Vector<T, 3_usize>)> for Quaternion<T>
[src]
impl<T> From<Quaternion<T>> for Vector4<T>
[src]
fn from(quat: Quaternion<T>) -> Self
[src]
impl<T> From<Quaternion<T>> for Rotation3<T>
[src]
fn from(quat: Quaternion<T>) -> Self
[src]
impl<T> From<Rotation3<T>> for Quaternion<T>
[src]
impl<T> From<Vector<T, 4_usize>> for Quaternion<T>
[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 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: Self) -> 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 Quaternion<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 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<Quaternion<T>> for Quaternion<T> where
Self: Mul<Output = Self> + Copy,
[src]
Self: Mul<Output = Self> + Copy,
fn mul_assign(&mut self, other: Self)
[src]
impl<T> MulAssign<T> for Quaternion<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 Quaternion<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
impl<T> NormL1 for Quaternion<T> where
Vector4<T>: NormL1<Output = T>,
[src]
Vector4<T>: NormL1<Output = T>,
impl<T: Float> NormL2 for Quaternion<T>
[src]
impl<T: Neg<Output = T> + Num + Copy> Num for Quaternion<T>
[src]
type FromStrRadixErr = T::FromStrRadixErr
fn from_str_radix(_s: &str, _radix: u32) -> Result<Self, Self::FromStrRadixErr>
[src]
impl<T> One for Quaternion<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<Quaternion<T>> for Quaternion<T>
[src]
fn eq(&self, other: &Quaternion<T>) -> bool
[src]
fn ne(&self, other: &Quaternion<T>) -> bool
[src]
impl<T: Neg<Output = T> + Num + Copy> Rem<Quaternion<T>> for Quaternion<T>
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, _other: Self) -> Self
[src]
impl<T> StructuralPartialEq for Quaternion<T>
[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<T> Sub<Quaternion<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: Self) -> 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 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: T) -> 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<Quaternion<T>> for Quaternion<T> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: Self)
[src]
impl<T> SubAssign<T> for Quaternion<T> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: T)
[src]
impl<T> Zero for Quaternion<T> where
T: Zero,
[src]
T: Zero,
Auto Trait Implementations
impl<T> RefUnwindSafe for Quaternion<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Quaternion<T> where
T: Send,
T: Send,
impl<T> Sync for Quaternion<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Quaternion<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Quaternion<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>,