pub struct PureQuaternion<T> {
pub x: T,
pub y: T,
pub z: T,
}
Expand description
A pure quaternion, i.e. a quaternion with a real part of zero.
A pure quaternion is a quaternion of the form $bi + cj + dk$. Computations with pure quaternions can be more efficient than with general quaternions. Apart from that, pure quaternions are used to represent 3D vectors and provide the compile-time guarantee that the real part is zero.
The PureQuaternion
struct is kept as similar as possible to the
[Quaternion
] struct with respect to its API. It provides
- a constructor
PureQuaternion::new
to create a new pure quaternion, - member data fields
x
,y
, andz
to access the coefficients of $i$, $j$, and $k$, respectively, - The types aliases
PQ32
andPQ64
are provided forPureQuaternion<f32>
andPureQuaternion<f64>
, respectively.
Fields§
§x: T
The coefficient of $i$.
y: T
The coefficient of $j$.
z: T
The coefficient of $k$.
Implementations§
Source§impl<T> PureQuaternion<T>
impl<T> PureQuaternion<T>
Source§impl<T> PureQuaternion<T>where
T: ConstZero,
impl<T> PureQuaternion<T>where
T: ConstZero,
Source§impl<T> PureQuaternion<T>
impl<T> PureQuaternion<T>
Sourcepub const I: Self
pub const I: Self
A constant PureQuaternion
of value $i$.
See also Quaternion::I
, PureQuaternion::i
.
§Example
let q = PureQuaternion::I;
assert_eq!(q, PureQuaternion::new(1.0, 0.0, 0.0));
Sourcepub const J: Self
pub const J: Self
A constant PureQuaternion
of value $j$.
See also Quaternion::J
, PureQuaternion::j
.
§Example
let q = PureQuaternion::J;
assert_eq!(q, PureQuaternion::new(0.0, 1.0, 0.0));
Sourcepub const K: Self
pub const K: Self
A constant PureQuaternion
of value $k$.
See also Quaternion::K
, PureQuaternion::k
.
§Example
let q = PureQuaternion::K;
assert_eq!(q, PureQuaternion::new(0.0, 0.0, 1.0));
Source§impl<T> PureQuaternion<T>
impl<T> PureQuaternion<T>
Sourcepub fn i() -> Self
pub fn i() -> Self
Returns the imaginary unit $i$.
See also Quaternion::i
, PureQuaternion::I
.
§Example
let q = PureQuaternion::i();
assert_eq!(q, PureQuaternion::new(1.0, 0.0, 0.0));
Sourcepub fn j() -> Self
pub fn j() -> Self
Returns the imaginary unit $j$.
See also Quaternion::j
, PureQuaternion::J
.
§Example
let q = PureQuaternion::j();
assert_eq!(q, PureQuaternion::new(0.0, 1.0, 0.0));
Sourcepub fn k() -> Self
pub fn k() -> Self
Returns the imaginary unit $k$.
See also Quaternion::k
, PureQuaternion::K
.
§Example
let q = PureQuaternion::k();
assert_eq!(q, PureQuaternion::new(0.0, 0.0, 1.0));
Source§impl<T> PureQuaternion<T>where
T: Float,
impl<T> PureQuaternion<T>where
T: Float,
Source§impl<T> PureQuaternion<T>
impl<T> PureQuaternion<T>
Sourcepub fn norm_sqr(&self) -> T
pub fn norm_sqr(&self) -> T
Returns the square of the norm.
The result is $x^2 + y^2 + z^2$ with some rounding errors. The rounding error is at most 2 ulps.
This is guaranteed to be more efficient than norm
.
Furthermore, T
only needs to support addition and multiplication
and therefore, this function works for more types than
norm
.
§Example
let q = PureQuaternion::new(1.0f32, 2.0, 3.0);
assert_eq!(q.norm_sqr(), 14.0);
Source§impl<T> PureQuaternion<T>
impl<T> PureQuaternion<T>
Source§impl<T> PureQuaternion<T>where
for<'a> &'a Self: Inv<Output = PureQuaternion<T>>,
impl<T> PureQuaternion<T>where
for<'a> &'a Self: Inv<Output = PureQuaternion<T>>,
Source§impl<T> PureQuaternion<T>where
T: Float,
impl<T> PureQuaternion<T>where
T: Float,
Sourcepub fn norm(self) -> T
pub fn norm(self) -> T
Calculates |self|.
The result is $\sqrt{x^2+y^2+z^2}$ with some possible rounding errors. The total relative rounding error is at most two ulps.
If any of the components of the input quaternion is NaN
, then NaN
is returned. Otherwise, if any of the components is infinite, then
a positive infinite value is returned.
§Example
let q = PureQuaternion::new(1.0f32, 2.0, 3.0);
assert_eq!(q.norm(), 14.0f32.sqrt());
Source§impl<T> PureQuaternion<T>where
T: Float,
impl<T> PureQuaternion<T>where
T: Float,
Sourcepub fn fast_norm(self) -> T
pub fn fast_norm(self) -> T
Calculates |self| without branching.
This function returns the same result as norm
, if
|self|² is a normal floating point number (i. e. there is no overflow
nor underflow), or if self
is zero. In these cases the maximum
relative error of the result is guaranteed to be less than two ulps.
In all other cases, there’s no guarantee on the precision of the
result:
- If |self|² overflows, then $\infty$ is returned.
- If |self|² underflows to zero, then zero will be returned.
- If |self|² is a subnormal number (very small floating point value with reduced relative precision), then the result is the square root of that.
In other words, this function can be imprecise for very large and very
small floating point numbers, but it is generally faster than
norm
, because it does not do any branching. So if you
are interested in maximum speed of your code, feel free to use this
function. If you need to be precise results for the whole range of the
floating point type T
, stay with norm
.
§Example
let q = PureQuaternion::new(1.0f32, 2.0, 3.0);
assert_eq!(q.fast_norm(), q.norm());
Source§impl<T> PureQuaternion<T>where
T: Float + FloatConst,
impl<T> PureQuaternion<T>where
T: Float + FloatConst,
Sourcepub fn exp(self) -> UnitQuaternion<T>
pub fn exp(self) -> UnitQuaternion<T>
Given a pure quaternion $q$, returns $e^q$, where $e$ is the base of the natural logarithm.
This method computes the exponential of a quaternion, handling various edge cases to ensure numerical stability and correctness:
-
NaN Input: If any component of the input quaternion is
NaN
, the method returns a quaternion filled withNaN
values. -
Large Norm: If the norm of the pure quaternion is too large, the method may return a
NaN
quaternion or a quaternion with the correct magnitude but inaccurate direction.
§Example
let q = PureQuaternion::new(1.0f32, 2.0, 3.0);
let exp_q = q.exp();
Trait Implementations§
Source§impl<T> Add<&PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Add<&PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Add<&PureQuaternion<T>> for &Quaternion<T>
impl<T> Add<&PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Add<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Add<PureQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<&PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Add<&PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<&PureQuaternion<T>> for PureQuaternion<T>
impl<T> Add<&PureQuaternion<T>> for PureQuaternion<T>
Source§impl<T> Add<&PureQuaternion<T>> for Quaternion<T>
impl<T> Add<&PureQuaternion<T>> for Quaternion<T>
Source§type Output = <Quaternion<T> as Add<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Add<PureQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<&PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Add<&PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<&Quaternion<T>> for &PureQuaternion<T>
impl<T> Add<&Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Add<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Add<Quaternion<T>>>::Output
+
operator.Source§impl<T> Add<&Quaternion<T>> for PureQuaternion<T>
impl<T> Add<&Quaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Add<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Add<Quaternion<T>>>::Output
+
operator.Source§impl<T> Add<&T> for &PureQuaternion<T>
impl<T> Add<&T> for &PureQuaternion<T>
Source§impl<T> Add<&T> for PureQuaternion<T>
impl<T> Add<&T> for PureQuaternion<T>
Source§impl<T> Add<&UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Add<&UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<&UnitQuaternion<T>> for PureQuaternion<T>
impl<T> Add<&UnitQuaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Add<PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Add<PureQuaternion<T>> for &Quaternion<T>
impl<T> Add<PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Add<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Add<PureQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Add<PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Add<PureQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<PureQuaternion<T>> for Quaternion<T>where
T: Add<T, Output = T>,
impl<T> Add<PureQuaternion<T>> for Quaternion<T>where
T: Add<T, Output = T>,
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
+
operator.Source§impl<T> Add<PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Add<PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
+
operator.Source§impl<T> Add<Quaternion<T>> for &PureQuaternion<T>
impl<T> Add<Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Add<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Add<Quaternion<T>>>::Output
+
operator.Source§impl<T> Add<Quaternion<T>> for PureQuaternion<T>where
T: Add<T, Output = T>,
impl<T> Add<Quaternion<T>> for PureQuaternion<T>where
T: Add<T, Output = T>,
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
+
operator.Source§impl<T> Add<T> for &PureQuaternion<T>
impl<T> Add<T> for &PureQuaternion<T>
Source§impl<T> Add<T> for PureQuaternion<T>
impl<T> Add<T> for PureQuaternion<T>
Source§impl<T> Add<UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Add<UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Add<UnitQuaternion<T>>>::Output
+
operator.Source§impl<T> Add<UnitQuaternion<T>> for PureQuaternion<T>where
T: Add<T, Output = T>,
impl<T> Add<UnitQuaternion<T>> for PureQuaternion<T>where
T: Add<T, Output = T>,
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
+
operator.Source§impl<T> Add for PureQuaternion<T>where
T: Add<T, Output = T>,
impl<T> Add for PureQuaternion<T>where
T: Add<T, Output = T>,
Source§type Output = PureQuaternion<T>
type Output = PureQuaternion<T>
+
operator.Source§impl<T, S> AddAssign<S> for PureQuaternion<T>
impl<T, S> AddAssign<S> for PureQuaternion<T>
Source§fn add_assign(&mut self, other: S)
fn add_assign(&mut self, other: S)
+=
operation. Read moreSource§impl<T: Clone> Clone for PureQuaternion<T>
impl<T: Clone> Clone for PureQuaternion<T>
Source§fn clone(&self) -> PureQuaternion<T>
fn clone(&self) -> PureQuaternion<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T> ConstZero for PureQuaternion<T>where
T: ConstZero,
impl<T> ConstZero for PureQuaternion<T>where
T: ConstZero,
Source§impl<T: Debug> Debug for PureQuaternion<T>
impl<T: Debug> Debug for PureQuaternion<T>
Source§impl<T: Default> Default for PureQuaternion<T>
impl<T: Default> Default for PureQuaternion<T>
Source§fn default() -> PureQuaternion<T>
fn default() -> PureQuaternion<T>
Source§impl<'de, T> Deserialize<'de> for PureQuaternion<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for PureQuaternion<T>where
T: Deserialize<'de>,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl<T> Div<&PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Div<&PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Div<&PureQuaternion<T>> for &Quaternion<T>
impl<T> Div<&PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Div<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Div<PureQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<&PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Div<&PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<&PureQuaternion<T>> for PureQuaternion<T>
impl<T> Div<&PureQuaternion<T>> for PureQuaternion<T>
Source§impl<T> Div<&PureQuaternion<T>> for Quaternion<T>
impl<T> Div<&PureQuaternion<T>> for Quaternion<T>
Source§type Output = <Quaternion<T> as Div<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Div<PureQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<&PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Div<&PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<&Quaternion<T>> for &PureQuaternion<T>
impl<T> Div<&Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Div<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Div<Quaternion<T>>>::Output
/
operator.Source§impl<T> Div<&Quaternion<T>> for PureQuaternion<T>
impl<T> Div<&Quaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Div<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Div<Quaternion<T>>>::Output
/
operator.Source§impl<T> Div<&T> for &PureQuaternion<T>
impl<T> Div<&T> for &PureQuaternion<T>
Source§impl<T> Div<&T> for PureQuaternion<T>
impl<T> Div<&T> for PureQuaternion<T>
Source§impl<T> Div<&UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Div<&UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<&UnitQuaternion<T>> for PureQuaternion<T>
impl<T> Div<&UnitQuaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Div<PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Div<PureQuaternion<T>> for &Quaternion<T>
impl<T> Div<PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Div<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Div<PureQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Div<PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Div<PureQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<PureQuaternion<T>> for Quaternion<T>
impl<T> Div<PureQuaternion<T>> for Quaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
/
operator.Source§impl<T> Div<PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Div<PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
/
operator.Source§impl<T> Div<Quaternion<T>> for &PureQuaternion<T>
impl<T> Div<Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Div<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Div<Quaternion<T>>>::Output
/
operator.Source§impl<T> Div<Quaternion<T>> for PureQuaternion<T>
impl<T> Div<Quaternion<T>> for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
/
operator.Source§impl<T> Div<T> for &PureQuaternion<T>
impl<T> Div<T> for &PureQuaternion<T>
Source§impl<T> Div<T> for PureQuaternion<T>
impl<T> Div<T> for PureQuaternion<T>
Source§impl<T> Div<UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Div<UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Div<UnitQuaternion<T>>>::Output
/
operator.Source§impl<T> Div<UnitQuaternion<T>> for PureQuaternion<T>
impl<T> Div<UnitQuaternion<T>> for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
/
operator.Source§impl<T> Div for PureQuaternion<T>
impl<T> Div for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
/
operator.Source§impl<T, S> DivAssign<S> for PureQuaternion<T>
impl<T, S> DivAssign<S> for PureQuaternion<T>
Source§fn div_assign(&mut self, other: S)
fn div_assign(&mut self, other: S)
/=
operation. Read moreSource§impl<T: Hash> Hash for PureQuaternion<T>
impl<T: Hash> Hash for PureQuaternion<T>
Source§impl<T> Inv for &PureQuaternion<T>
impl<T> Inv for &PureQuaternion<T>
Source§impl<T> Inv for PureQuaternion<T>where
for<'a> &'a Self: Inv<Output = PureQuaternion<T>>,
impl<T> Inv for PureQuaternion<T>where
for<'a> &'a Self: Inv<Output = PureQuaternion<T>>,
Source§impl<T> Mul<&PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Mul<&PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Mul<&PureQuaternion<T>> for &Quaternion<T>
impl<T> Mul<&PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Mul<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Mul<PureQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<&PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Mul<&PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<&PureQuaternion<T>> for PureQuaternion<T>
impl<T> Mul<&PureQuaternion<T>> for PureQuaternion<T>
Source§impl<T> Mul<&PureQuaternion<T>> for Quaternion<T>
impl<T> Mul<&PureQuaternion<T>> for Quaternion<T>
Source§type Output = <Quaternion<T> as Mul<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Mul<PureQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<&PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Mul<&PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<&Quaternion<T>> for &PureQuaternion<T>
impl<T> Mul<&Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Mul<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Mul<Quaternion<T>>>::Output
*
operator.Source§impl<T> Mul<&Quaternion<T>> for PureQuaternion<T>
impl<T> Mul<&Quaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Mul<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Mul<Quaternion<T>>>::Output
*
operator.Source§impl<T> Mul<&T> for &PureQuaternion<T>
impl<T> Mul<&T> for &PureQuaternion<T>
Source§impl<T> Mul<&T> for PureQuaternion<T>
impl<T> Mul<&T> for PureQuaternion<T>
Source§impl<T> Mul<&UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Mul<&UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<&UnitQuaternion<T>> for PureQuaternion<T>
impl<T> Mul<&UnitQuaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Mul<PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Mul<PureQuaternion<T>> for &Quaternion<T>
impl<T> Mul<PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Mul<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Mul<PureQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Mul<PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Mul<PureQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<PureQuaternion<T>> for Quaternion<T>
impl<T> Mul<PureQuaternion<T>> for Quaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
*
operator.Source§impl<T> Mul<PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Mul<PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
*
operator.Source§impl<T> Mul<Quaternion<T>> for &PureQuaternion<T>
impl<T> Mul<Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Mul<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Mul<Quaternion<T>>>::Output
*
operator.Source§impl<T> Mul<Quaternion<T>> for PureQuaternion<T>
impl<T> Mul<Quaternion<T>> for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
*
operator.Source§impl<T> Mul<T> for &PureQuaternion<T>
impl<T> Mul<T> for &PureQuaternion<T>
Source§impl<T> Mul<T> for PureQuaternion<T>
impl<T> Mul<T> for PureQuaternion<T>
Source§impl<T> Mul<UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Mul<UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Mul<UnitQuaternion<T>>>::Output
*
operator.Source§impl<T> Mul<UnitQuaternion<T>> for PureQuaternion<T>
impl<T> Mul<UnitQuaternion<T>> for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
*
operator.Source§impl<T> Mul for PureQuaternion<T>
impl<T> Mul for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
*
operator.Source§impl<T, S> MulAssign<S> for PureQuaternion<T>
impl<T, S> MulAssign<S> for PureQuaternion<T>
Source§fn mul_assign(&mut self, other: S)
fn mul_assign(&mut self, other: S)
*=
operation. Read moreSource§impl<T: PartialEq> PartialEq for PureQuaternion<T>
impl<T: PartialEq> PartialEq for PureQuaternion<T>
Source§impl<T> Serialize for PureQuaternion<T>where
T: Serialize,
impl<T> Serialize for PureQuaternion<T>where
T: Serialize,
Source§impl<T> Sub<&PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Sub<&PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Sub<&PureQuaternion<T>> for &Quaternion<T>
impl<T> Sub<&PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Sub<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Sub<PureQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<&PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Sub<&PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<&PureQuaternion<T>> for PureQuaternion<T>
impl<T> Sub<&PureQuaternion<T>> for PureQuaternion<T>
Source§impl<T> Sub<&PureQuaternion<T>> for Quaternion<T>
impl<T> Sub<&PureQuaternion<T>> for Quaternion<T>
Source§type Output = <Quaternion<T> as Sub<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Sub<PureQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<&PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Sub<&PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<&Quaternion<T>> for &PureQuaternion<T>
impl<T> Sub<&Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Sub<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Sub<Quaternion<T>>>::Output
-
operator.Source§impl<T> Sub<&Quaternion<T>> for PureQuaternion<T>
impl<T> Sub<&Quaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Sub<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Sub<Quaternion<T>>>::Output
-
operator.Source§impl<T> Sub<&T> for &PureQuaternion<T>
impl<T> Sub<&T> for &PureQuaternion<T>
Source§impl<T> Sub<&T> for PureQuaternion<T>
impl<T> Sub<&T> for PureQuaternion<T>
Source§impl<T> Sub<&UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Sub<&UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<&UnitQuaternion<T>> for PureQuaternion<T>
impl<T> Sub<&UnitQuaternion<T>> for PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<PureQuaternion<T>> for &PureQuaternion<T>
impl<T> Sub<PureQuaternion<T>> for &PureQuaternion<T>
Source§impl<T> Sub<PureQuaternion<T>> for &Quaternion<T>
impl<T> Sub<PureQuaternion<T>> for &Quaternion<T>
Source§type Output = <Quaternion<T> as Sub<PureQuaternion<T>>>::Output
type Output = <Quaternion<T> as Sub<PureQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<PureQuaternion<T>> for &UnitQuaternion<T>
impl<T> Sub<PureQuaternion<T>> for &UnitQuaternion<T>
Source§type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output
type Output = <UnitQuaternion<T> as Sub<PureQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<PureQuaternion<T>> for Quaternion<T>where
T: Sub<T, Output = T>,
impl<T> Sub<PureQuaternion<T>> for Quaternion<T>where
T: Sub<T, Output = T>,
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
-
operator.Source§impl<T> Sub<PureQuaternion<T>> for UnitQuaternion<T>
impl<T> Sub<PureQuaternion<T>> for UnitQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
-
operator.Source§impl<T> Sub<Quaternion<T>> for &PureQuaternion<T>
impl<T> Sub<Quaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Sub<Quaternion<T>>>::Output
type Output = <PureQuaternion<T> as Sub<Quaternion<T>>>::Output
-
operator.Source§impl<T> Sub<Quaternion<T>> for PureQuaternion<T>
impl<T> Sub<Quaternion<T>> for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
-
operator.Source§impl<T> Sub<T> for &PureQuaternion<T>
impl<T> Sub<T> for &PureQuaternion<T>
Source§impl<T> Sub<T> for PureQuaternion<T>where
T: Neg<Output = T>,
impl<T> Sub<T> for PureQuaternion<T>where
T: Neg<Output = T>,
Source§impl<T> Sub<UnitQuaternion<T>> for &PureQuaternion<T>
impl<T> Sub<UnitQuaternion<T>> for &PureQuaternion<T>
Source§type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output
type Output = <PureQuaternion<T> as Sub<UnitQuaternion<T>>>::Output
-
operator.Source§impl<T> Sub<UnitQuaternion<T>> for PureQuaternion<T>
impl<T> Sub<UnitQuaternion<T>> for PureQuaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
-
operator.Source§impl<T> Sub for PureQuaternion<T>where
T: Sub<T, Output = T>,
impl<T> Sub for PureQuaternion<T>where
T: Sub<T, Output = T>,
Source§type Output = PureQuaternion<T>
type Output = PureQuaternion<T>
-
operator.Source§impl<T, S> SubAssign<S> for PureQuaternion<T>
impl<T, S> SubAssign<S> for PureQuaternion<T>
Source§fn sub_assign(&mut self, other: S)
fn sub_assign(&mut self, other: S)
-=
operation. Read more