Struct UnitQuaternion

Source
pub struct UnitQuaternion<T>(/* private fields */);
Expand description

A quaternion with norm $1$.

Unit quaternions form a non-commutative group that can be conveniently used for rotating 3D vectors. A 3D vector can be interpreted as a pure quaternion (a quaternion with a real part of zero). Such a pure quaternion $v$ can be rotated in 3D space by computing $q^{-1} \cdot v \cdot q$ for a unit quaternion $q$. The resulting product is again a pure quaternion, which is $v$ rotated around the axis given by the imaginary part of $q$. The method rotate_vector performs this operation efficiently. The angle of rotation is double the angle between $1$ and $q$ interpreted as 4D vectors.

You can create a UnitQuaternion by normalizing a Quaternion using the Quaternion::normalize method. Alternatively, you can use from_euler_angles, from_rotation_vector, or from_rotation_matrix3x3 to obtain one. The inverse functions to_euler_angles, to_rotation_vector, and to_rotation_matrix3x3 are also provided.

UnitQuaternion offers the same arithmetic operations as Quaternion. Multiplying two unit quaternions yields a unit quaternion in theory. However, due to limited machine precision, rounding errors accumulate in practice and the resulting norm may deviate from $1$ over time. Thus, when you multiply unit quaternions many times, you may need to adjust the norm to maintain accuracy. This can be done by calling the function adjust_norm.

Furthermore, you can interpolate uniformly between two quaternions using the slerp method, which stands for spherical linear interpolation. This can be used for smooth transitions between 3D rotations.

See also Quaternion.

§Examples

Basic usage:

// Creating a UnitQuaternion from Euler angles
let (roll, pitch, yaw) = (1.5, 1.0, 3.0);
let uq = UnitQuaternion::from_euler_angles(roll, pitch, yaw);

// Rotating a vector using the UnitQuaternion
let vector = [1.0, 0.0, 0.0];
let rotated_vector = uq.rotate_vector(vector);

Implementations§

Source§

impl<T> UnitQuaternion<T>
where T: Float,

Source

pub fn from_euler_angles(roll: T, pitch: T, yaw: T) -> Self

Creates a new Quaternion from roll, pitch and yaw angles.

§Example
let uq = UnitQuaternion::from_euler_angles(1.5, 1.0, 3.0);
Source

pub fn from_euler_angles_struct(angles: EulerAngles<T>) -> Self

Creates a new Quaternion from Euler angles.

Note. The reason that this function is marked as unstable is that I’m not 100% confident about the naming of the function.

§Example
let angles = EulerAngles { roll: 1.5, pitch: 1.0, yaw: 3.0 };
let uq = UnitQuaternion::from_euler_angles_struct(angles);
Source§

impl<T> UnitQuaternion<T>
where T: Float + FloatConst,

Source

pub fn to_euler_angles(&self) -> EulerAngles<T>

Converts the UnitQuaternion to roll, pitch, and yaw angles.

§Example
let uq = UnitQuaternion::from_euler_angles(1.5, 1.0, 3.0);
let angles = uq.to_euler_angles();
Source§

impl<T> UnitQuaternion<T>
where T: Float,

Source

pub fn from_rotation_vector(v: &[T; 3]) -> Self

Returns a quaternion from a vector which is parallel to the rotation axis and whose norm is the rotation angle.

This function is the inverse of to_rotation_vector.

The results of this function may not be accurate, if the input has a very large norm. If the input vector is not finite (i. e. it contains an infinite or NaN component), then the result is filled with NaN.

§Example
let v = [1.0, 0.0, 0.0];
let uq = UnitQuaternion::from_rotation_vector(&v);
Source§

impl<T> UnitQuaternion<T>
where T: Float + FloatConst,

Source

pub fn to_rotation_vector(&self) -> [T; 3]

Returns a rotation vector which is parallel to the rotation axis and whose norm is the rotation angle.

This function is the inverse of from_rotation_vector.

§Example
let uq = UnitQuaternion::from_euler_angles(1.5, 1.0, 3.0);
let v = uq.to_rotation_vector();
Source§

impl<T> UnitQuaternion<T>
where T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + One + Clone,

Source

pub fn to_rotation_matrix3x3(self) -> [T; 9]

Computes the rotation matrix implied by a unit quaternion.

The matrix is returned in row major order, i. e. the indices into the result array yield the elements in the following order:

    [0, 1, 2,
     3, 4, 5,
     6, 7, 8]

Multiplying by the returned matrix gives the same result as using rotate_vector modulo slightly different rounding errors.

§Runtime Considerations

The matrix multiplication itself can be assumed to be more runtime efficient than rotate_vector. However, computing the matrix also comes with additional cost. Thus general advice is: Use rotate_vector, if you want to rotate a single vector. Perform the matrix multiplication, if more than one vector needs to be rotated.

§Example
let uq = UQ64::I;
let matrix = uq.to_rotation_matrix3x3();
Source§

impl<T> UnitQuaternion<T>
where T: Float,

Source

pub fn from_rotation_matrix3x3(mat: &impl ReadMat3x3<T>) -> UnitQuaternion<T>

Computes a quaternion from a 3x3 rotation matrix.

The input matrix $O$ is required to be an actual rotation matrix, i. e. $O^TO$ is the identity matrix and $\det O = 1$ (neglecting floating point rounding errors).

The quaternion solution with non-negative real part is returned. This function reverses the method to_rotation_matrix3x3.

§Example
let matrix = [[0.0, 1.0, 0.0],
              [0.0, 0.0, 1.0],
              [1.0, 0.0, 0.0]];
let uq = UnitQuaternion::from_rotation_matrix3x3(&matrix);
Source§

impl<T> UnitQuaternion<T>
where T: Float,

Source

pub fn from_two_vectors(a: &[T; 3], b: &[T; 3]) -> UnitQuaternion<T>

Returns a unit quaternion that rotates vector $\vec a$ to vector $\vec b$ with the minimum angle of rotation.

The method rotate_vector can be used to apply the rotation. The resulting unit quaternion maps the ray ${t\vec{a} : t > 0}$ to the ray ${t\vec{b} : t > 0}$.

Note that the input vectors neither need to be normalized nor have the same magnitude. In the case where the input vectors point in opposite directions, there are multiple solutions to the problem, and one will be returned. If one (or both) of the input vectors is the zero vector, the unit quaternion $1$ is returned.

§Example
let a = [1.0, 0.0, 0.0];
let b = [0.0, 1.0, 0.0];
let uq = UQ64::from_two_vectors(&a, &b);
let angles = uq.to_euler_angles();
assert!((angles.yaw - std::f64::consts::FRAC_PI_2).abs() < 1e-10);
assert!((angles.pitch).abs() < 1e-10);
assert!((angles.roll).abs() < 1e-10);
Source§

impl<T> UnitQuaternion<T>
where T: Float,

Source

pub fn normalize(q: Quaternion<T>) -> Option<Self>

Normalizes the quaternion to length $1$.

The sign of the real part will be the same as the sign of the input. If the input quaternion

  • is zero, or
  • has infinite length, or
  • has a NaN value,

then None will be returned.

Note, that it may be more natural to use the method Quaternion::normalize instead of this function. Both functions are equivalent, but the method is more idiomatic in most cases.

§Example
let q = UnitQuaternion::from_euler_angles(1.5, 1.0, 3.0);
let normalized = UnitQuaternion::normalize(q.into_inner());
assert_eq!(normalized, Some(q));
Source§

impl<T> UnitQuaternion<T>
where T: ConstZero + ConstOne,

Source

pub const ONE: Self

A constant UnitQuaternion of value $1$.

See also UnitQuaternion::one, Quaternion::ONE.

§Example
assert_eq!(UQ32::ONE, UQ32::one());
Source

pub const I: Self

A constant UnitQuaternion of value $i$.

See also UnitQuaternion::i, Quaternion::I.

§Example
assert_eq!(UQ32::I, UQ32::i());
Source

pub const J: Self

A constant UnitQuaternion of value $j$.

See also UnitQuaternion::j, Quaternion::J.

§Example
assert_eq!(UQ32::J, UQ32::j());
Source

pub const K: Self

A constant UnitQuaternion of value $k$.

See also UnitQuaternion::k, Quaternion::K.

§Example
assert_eq!(UQ32::K, UQ32::k());
Source§

impl<T> UnitQuaternion<T>
where T: Zero + One,

Source

pub fn one() -> Self

Returns the identity quaternion $1$.

See also UnitQuaternion::ONE, Quaternion::ONE.

§Example
assert_eq!(UQ32::one().into_inner(), Q32::one());
Source

pub fn i() -> Self

Returns the imaginary unit $i$.

See also UnitQuaternion::I, Quaternion::i.

§Example
assert_eq!(UQ32::i().into_inner(), Q32::new(0.0, 1.0, 0.0, 0.0));
Source

pub fn j() -> Self

Returns the imaginary unit $j$.

See also UnitQuaternion::J, Quaternion::j.

§Example
assert_eq!(UQ32::j().into_inner(), Q32::new(0.0, 0.0, 1.0, 0.0));
Source

pub fn k() -> Self

Returns the imaginary unit $k$.

See also UnitQuaternion::K, Quaternion::k.

§Example
assert_eq!(UQ32::k().into_inner(), Q32::new(0.0, 0.0, 0.0, 1.0));
Source§

impl<T> UnitQuaternion<T>

Source

pub fn into_quaternion(self) -> Quaternion<T>

Returns the inner quaternion.

This function does the same as into_inner. Client code can decide which function to use based on the naming preference and context.

§Example
let uq = UQ64::I;
let q = uq.into_quaternion();
assert_eq!(q, Q64::I);
Source

pub fn into_inner(self) -> Quaternion<T>

Returns the inner quaternion.

This function does the same as into_quaternion. Client code can decide which function to use based on the naming preference and context.

§Example
let uq = UQ64::I;
let q = uq.into_inner();
assert_eq!(q, Q64::I);
Source

pub fn as_quaternion(&self) -> &Quaternion<T>

Returns a reference to the inner quaternion.

§Example
let uq = UQ64::I;
let q = uq.as_quaternion();
assert_eq!(q, &Q64::I);
Source§

impl<T> UnitQuaternion<T>
where T: Clone + Neg<Output = T>,

Source

pub fn conj(&self) -> Self

Returns the conjugate quaternion, i. e. the imaginary part is negated.

§Example
let uq = UQ64::I;
let conj = uq.conj();
assert_eq!(conj, -uq);
Source§

impl<T> UnitQuaternion<T>
where T: Clone + Neg<Output = T>,

Source

pub fn inv(&self) -> Self

Returns the multiplicative inverse 1/self.

This is the same as the conjugate of self.

§Example
let uq = UQ32::I;
let inv = uq.inv();
assert_eq!(inv, -UQ32::I);
Source§

impl<T> UnitQuaternion<T>
where T: Add<T, Output = T> + Mul<T, Output = T>,

Source

pub fn dot(self, other: Self) -> T

Computes the dot product of two unit quaternions interpreted as 4D real vectors.

§Example
let uq1 = UQ32::I;
let uq2 = UQ32::J;
let dot = uq1.dot(uq2);
assert_eq!(dot, 0.0);
Source§

impl<T> UnitQuaternion<T>
where T: Float,

Source

pub fn adjust_norm(self) -> Self

Renormalizes self.

By many multiplications of unit quaternions, round off errors can lead to norms which are deviating from $1$ significantly. This function fixes that inaccuracy.

§Panics

Panics if the norm of the quaternion is too inaccurate to be renormalized.

§Example
let uq = UnitQuaternion::from_euler_angles(1.5, 1.0, 3.0);
let adjusted = uq.adjust_norm();
assert!((adjusted - uq).norm() < 1e-10);
Source§

impl<T> UnitQuaternion<T>
where T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Clone,

Source

pub fn rotate_vector(self, vector: [T; 3]) -> [T; 3]

Rotates a vector using a quaternion.

Given a unit quaternion $q$ and a pure quaternion $v$ (i. e. a quaternion with real part zero), the mapping $v \mapsto q^*vq$ is a 3D rotation in the space of pure quaternions. This function performs this 3D rotation efficiently.

§Example
let uq = UQ64::I;
let rotated = uq.rotate_vector([1.0, 2.0, 3.0]);
assert_eq!(rotated, [1.0, -2.0, -3.0]);
Source§

impl<T> UnitQuaternion<T>
where T: Float,

Source

pub fn slerp(&self, other: &Self, t: T) -> Self

Spherical linear interpolation between two unit quaternions.

t should be in the range [0, 1], where 0 returns self and 1 returns other or -other, whichever is closer to self.

§Example
let uq1 = UnitQuaternion::from_euler_angles(1.5, 1.0, 3.0);
let uq2 = UnitQuaternion::from_euler_angles(0.5, 2.0, 1.0);
let uq = uq1.slerp(&uq2, 0.5);
Source§

impl<T> UnitQuaternion<T>
where T: Float + FloatConst,

Source

pub fn sqrt(self) -> Self

Computes the square root of a unit quaternion.

Given an input unit quaternion $c$, this function returns the unit quaternion $q$ which satisfies $q^2 = c$ and has a real part with a positive sign.

For $c = -1$, there are multiple solutions to these constraints. In that case $q = \pm i$ is returned. The sign is determined by the input coefficient of the imaginary unit $i$.

In any case, the three imaginary parts of the result have the same sign as the three imaginary parts of the input.

§Example
let uq = UnitQuaternion::from_euler_angles(1.5, 1.0, 3.0);
let sqrt = uq.sqrt();
assert!((sqrt * sqrt - uq).norm() < 1e-10);
Source§

impl<T> UnitQuaternion<T>
where T: Float + FloatConst,

Source

pub fn ln(self) -> PureQuaternion<T>

Computes the natural logarithm of a unit quaternion.

The function implements the following guarantees for extreme input values:

  • The function is continuous onto the branch cut taking into account the sign of the coefficient of $i$.
  • For all quaternions $q$ it holds q.conj().ln() == q.ln().conj().
  • The signs of the coefficients of the imaginary parts of the outputs are equal to the signs of the respective coefficients of the inputs. This also holds for signs of zeros, but not for NaNs.
  • If the input has a NaN value, then the result is NaN in all components.
§Example
let q = Quaternion::new(1.0f32, 2.0, 3.0, 4.0).normalize().unwrap();
let ln_q = q.ln();

Trait Implementations§

Source§

impl<T> Add<&PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&PureQuaternion<T>> for UnitQuaternion<T>
where Self: Add<PureQuaternion<T>>, PureQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Add<Quaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Quaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&Quaternion<T>> for UnitQuaternion<T>
where Self: Add<Quaternion<T>>, Quaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Add<Quaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Quaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Add<T> + Clone, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Add<T>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&T> for UnitQuaternion<T>
where Self: Add<T>, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Add<T>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Add<UnitQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&UnitQuaternion<T>> for PureQuaternion<T>
where Self: Add<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&UnitQuaternion<T>> for Quaternion<T>
where Self: Add<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <Quaternion<T> as Add<UnitQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<&UnitQuaternion<T>> for UnitQuaternion<T>
where Self: Add<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<PureQuaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Add<PureQuaternion<T>, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Add<Quaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Quaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<Quaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Add<Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Quaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Add<T> + Clone,

Source§

type Output = <UnitQuaternion<T> as Add<T>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<T> for UnitQuaternion<T>
where Quaternion<T>: Add<T, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Add<UnitQuaternion<T>>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<UnitQuaternion<T>> for PureQuaternion<T>
where T: Add<T, Output = T>,

Source§

type Output = Quaternion<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<UnitQuaternion<T>> for Quaternion<T>
where T: Add<T, Output = T>,

Source§

type Output = Quaternion<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UnitQuaternion<T>) -> Self

Performs the + operation. Read more
Source§

impl Add<UnitQuaternion<f32>> for f32

Source§

type Output = Quaternion<f32>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UQ32) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<UnitQuaternion<f64>> for f64

Source§

type Output = Quaternion<f64>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UQ64) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for UnitQuaternion<T>
where Quaternion<T>: Add<Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Borrow<Quaternion<T>> for UnitQuaternion<T>

Source§

fn borrow(&self) -> &Quaternion<T>

Immutably borrows from an owned value. Read more
Source§

impl<T: Clone> Clone for UnitQuaternion<T>

Source§

fn clone(&self) -> UnitQuaternion<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> ConstOne for UnitQuaternion<T>
where T: ConstZero + ConstOne + Num + Clone,

Source§

const ONE: Self = Self::ONE

The multiplicative identity element of Self, 1.
Source§

impl<T: Debug> Debug for UnitQuaternion<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Default for UnitQuaternion<T>
where T: Num + Clone,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de, T> Deserialize<'de> for UnitQuaternion<T>
where T: Deserialize<'de>,

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> Div<&PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&PureQuaternion<T>> for UnitQuaternion<T>
where Self: Div<PureQuaternion<T>>, PureQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Div<Quaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Quaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&Quaternion<T>> for UnitQuaternion<T>
where Self: Div<Quaternion<T>>, Quaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Div<Quaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Quaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Div<T> + Clone, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Div<T>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&T> for UnitQuaternion<T>
where Self: Div<T>, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Div<T>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Div<UnitQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&UnitQuaternion<T>> for PureQuaternion<T>
where Self: Div<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&UnitQuaternion<T>> for Quaternion<T>
where Self: Div<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <Quaternion<T> as Div<UnitQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<&UnitQuaternion<T>> for UnitQuaternion<T>
where Self: Div<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<PureQuaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Div<PureQuaternion<T>, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Div<Quaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Quaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<Quaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Div<Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Quaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Div<T> + Clone,

Source§

type Output = <UnitQuaternion<T> as Div<T>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<T> for UnitQuaternion<T>
where Quaternion<T>: Div<T, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Div<UnitQuaternion<T>>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<UnitQuaternion<T>> for PureQuaternion<T>
where T: Num + Clone + Neg<Output = T>,

Source§

type Output = Quaternion<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<UnitQuaternion<T>> for Quaternion<T>
where Quaternion<T>: Mul<Output = Quaternion<T>>, T: Neg<Output = T> + Clone,

Source§

type Output = Quaternion<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<UnitQuaternion<f32>> for f32

Source§

type Output = Quaternion<f32>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UQ32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<UnitQuaternion<f64>> for f64

Source§

type Output = Quaternion<f64>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UQ64) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div for UnitQuaternion<T>
where Quaternion<T>: Mul<Output = Quaternion<T>>, T: Clone + Neg<Output = T>,

Source§

type Output = UnitQuaternion<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, S> DivAssign<S> for UnitQuaternion<T>
where Self: Div<S, Output = Self> + Clone,

Source§

fn div_assign(&mut self, other: S)

Performs the /= operation. Read more
Source§

impl<'a, T> From<&'a UnitQuaternion<T>> for &'a Quaternion<T>

Source§

fn from(q: &'a UnitQuaternion<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<UnitQuaternion<T>> for Quaternion<T>

Source§

fn from(q: UnitQuaternion<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Hash> Hash for UnitQuaternion<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> Inv for &UnitQuaternion<T>
where T: Clone + Neg<Output = T>,

Source§

type Output = UnitQuaternion<T>

The result after applying the operator.
Source§

fn inv(self) -> Self::Output

Returns the multiplicative inverse of self. Read more
Source§

impl<T> Inv for UnitQuaternion<T>
where T: Clone + Neg<Output = T>,

Source§

type Output = UnitQuaternion<T>

The result after applying the operator.
Source§

fn inv(self) -> Self::Output

Returns the multiplicative inverse of self. Read more
Source§

impl<T> Mul<&PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&PureQuaternion<T>> for UnitQuaternion<T>
where Self: Mul<PureQuaternion<T>>, PureQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Mul<Quaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Quaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&Quaternion<T>> for UnitQuaternion<T>
where Self: Mul<Quaternion<T>>, Quaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Mul<Quaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Quaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Mul<T> + Clone, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Mul<T>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&T> for UnitQuaternion<T>
where Self: Mul<T>, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Mul<T>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Mul<UnitQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&UnitQuaternion<T>> for PureQuaternion<T>
where Self: Mul<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&UnitQuaternion<T>> for Quaternion<T>
where Self: Mul<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <Quaternion<T> as Mul<UnitQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<&UnitQuaternion<T>> for UnitQuaternion<T>
where Self: Mul<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<PureQuaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Mul<PureQuaternion<T>, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Mul<Quaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Quaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<Quaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Mul<Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Quaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Mul<T> + Clone,

Source§

type Output = <UnitQuaternion<T> as Mul<T>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<T> for UnitQuaternion<T>
where Quaternion<T>: Mul<T, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Mul<UnitQuaternion<T>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<UnitQuaternion<T>> for PureQuaternion<T>
where PureQuaternion<T>: Mul<Quaternion<T>, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<UnitQuaternion<T>> for Quaternion<T>
where Quaternion<T>: Mul<Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<UnitQuaternion<f32>> for f32

Source§

type Output = Quaternion<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UQ32) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<UnitQuaternion<f64>> for f64

Source§

type Output = Quaternion<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UQ64) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul for UnitQuaternion<T>
where Quaternion<T>: Mul<Output = Quaternion<T>>,

Source§

type Output = UnitQuaternion<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, S> MulAssign<S> for UnitQuaternion<T>
where Self: Mul<S, Output = Self> + Clone,

Source§

fn mul_assign(&mut self, other: S)

Performs the *= operation. Read more
Source§

impl<T> Neg for UnitQuaternion<T>
where T: Neg<Output = T>,

Source§

type Output = UnitQuaternion<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T> One for UnitQuaternion<T>
where T: Num + Clone,

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl<T: PartialEq> PartialEq for UnitQuaternion<T>

Source§

fn eq(&self, other: &UnitQuaternion<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Serialize for UnitQuaternion<T>
where T: Serialize,

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T> Sub<&PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&PureQuaternion<T>> for UnitQuaternion<T>
where Self: Sub<PureQuaternion<T>>, PureQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &PureQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Sub<Quaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Quaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&Quaternion<T>> for UnitQuaternion<T>
where Self: Sub<Quaternion<T>>, Quaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Sub<Quaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Quaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Sub<T> + Clone, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Sub<T>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&T> for UnitQuaternion<T>
where Self: Sub<T>, T: Clone,

Source§

type Output = <UnitQuaternion<T> as Sub<T>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Sub<UnitQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&UnitQuaternion<T>> for PureQuaternion<T>
where Self: Sub<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&UnitQuaternion<T>> for Quaternion<T>
where Self: Sub<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <Quaternion<T> as Sub<UnitQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<&UnitQuaternion<T>> for UnitQuaternion<T>
where Self: Sub<UnitQuaternion<T>>, UnitQuaternion<T>: Clone,

Source§

type Output = <UnitQuaternion<T> as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<PureQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<PureQuaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Sub<PureQuaternion<T>, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: PureQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<Quaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Sub<Quaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Quaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<Quaternion<T>> for UnitQuaternion<T>
where Quaternion<T>: Sub<Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Quaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<T> for &UnitQuaternion<T>
where UnitQuaternion<T>: Sub<T> + Clone,

Source§

type Output = <UnitQuaternion<T> as Sub<T>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<T> for UnitQuaternion<T>
where Quaternion<T>: Sub<T, Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<UnitQuaternion<T>> for &PureQuaternion<T>

Source§

type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<UnitQuaternion<T>> for &Quaternion<T>

Source§

type Output = <Quaternion<T> as Sub<UnitQuaternion<T>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<UnitQuaternion<T>> for &UnitQuaternion<T>

Source§

type Output = <UnitQuaternion<T> as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<UnitQuaternion<T>> for PureQuaternion<T>
where T: Sub<T, Output = T> + Neg<Output = T>,

Source§

type Output = Quaternion<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<UnitQuaternion<T>> for Quaternion<T>
where T: Sub<T, Output = T>,

Source§

type Output = Quaternion<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UnitQuaternion<T>) -> Self

Performs the - operation. Read more
Source§

impl Sub<UnitQuaternion<f32>> for f32

Source§

type Output = Quaternion<f32>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UQ32) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<UnitQuaternion<f64>> for f64

Source§

type Output = Quaternion<f64>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UQ64) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for UnitQuaternion<T>
where Quaternion<T>: Sub<Output = Quaternion<T>>,

Source§

type Output = Quaternion<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: UnitQuaternion<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Copy> Copy for UnitQuaternion<T>

Source§

impl<T: Eq> Eq for UnitQuaternion<T>

Source§

impl<T> StructuralPartialEq for UnitQuaternion<T>

Auto Trait Implementations§

§

impl<T> Freeze for UnitQuaternion<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for UnitQuaternion<T>
where T: RefUnwindSafe,

§

impl<T> Send for UnitQuaternion<T>
where T: Send,

§

impl<T> Sync for UnitQuaternion<T>
where T: Sync,

§

impl<T> Unpin for UnitQuaternion<T>
where T: Unpin,

§

impl<T> UnwindSafe for UnitQuaternion<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,