Struct nalgebra::geometry::Quaternion
[−]
[src]
#[repr(C)]pub struct Quaternion<N: Real> { pub coords: Vector4<N>, }
A quaternion. See the type alias UnitQuaternion = Unit<Quaternion>
for a quaternion
that may be used as a rotation.
Fields
coords: Vector4<N>
This quaternion as a 4D vector of coordinates in the [ x, y, z, w ]
storage order.
Methods
impl<N: Real> Quaternion<N>
[src]
pub fn into_owned(self) -> Quaternion<N>
[src]
: This method is a no-op and will be removed in a future release.
Moves this unit quaternion into one that owns its data.
pub fn clone_owned(&self) -> Quaternion<N>
[src]
: This method is a no-op and will be removed in a future release.
Clones this unit quaternion into one that owns its data.
pub fn normalize(&self) -> Quaternion<N>
[src]
Normalizes this quaternion.
pub fn conjugate(&self) -> Quaternion<N>
[src]
Compute the conjugate of this quaternion.
pub fn try_inverse(&self) -> Option<Quaternion<N>>
[src]
Inverts this quaternion if it is not zero.
pub fn lerp(&self, other: &Quaternion<N>, t: N) -> Quaternion<N>
[src]
Linear interpolation between two quaternion.
pub fn vector(
&self
) -> MatrixSlice<N, U3, U1, RStride<N, U4, U1>, CStride<N, U4, U1>>
[src]
&self
) -> MatrixSlice<N, U3, U1, RStride<N, U4, U1>, CStride<N, U4, U1>>
The vector part (i, j, k)
of this quaternion.
pub fn scalar(&self) -> N
[src]
The scalar part w
of this quaternion.
pub fn as_vector(&self) -> &Vector4<N>
[src]
Reinterprets this quaternion as a 4D vector.
pub fn norm(&self) -> N
[src]
The norm of this quaternion.
pub fn norm_squared(&self) -> N
[src]
The squared norm of this quaternion.
pub fn polar_decomposition(&self) -> (N, N, Option<Unit<Vector3<N>>>)
[src]
The polar decomposition of this quaternion.
Returns, from left to right: the quaternion norm, the half rotation angle, the rotation
axis. If the rotation angle is zero, the rotation axis is set to None
.
pub fn exp(&self) -> Quaternion<N>
[src]
Compute the exponential of a quaternion.
pub fn ln(&self) -> Quaternion<N>
[src]
Compute the natural logarithm of a quaternion.
pub fn powf(&self, n: N) -> Quaternion<N>
[src]
Raise the quaternion to a given floating power.
pub fn as_vector_mut(&mut self) -> &mut Vector4<N>
[src]
Transforms this quaternion into its 4D vector form (Vector part, Scalar part).
pub fn vector_mut(
&mut self
) -> MatrixSliceMut<N, U3, U1, RStride<N, U4, U1>, CStride<N, U4, U1>>
[src]
&mut self
) -> MatrixSliceMut<N, U3, U1, RStride<N, U4, U1>, CStride<N, U4, U1>>
The mutable vector part (i, j, k)
of this quaternion.
pub fn conjugate_mut(&mut self)
[src]
Replaces this quaternion by its conjugate.
pub fn try_inverse_mut(&mut self) -> bool
[src]
Inverts this quaternion in-place if it is not zero.
pub fn normalize_mut(&mut self) -> N
[src]
Normalizes this quaternion.
impl<N: Real> Quaternion<N>
[src]
pub fn from_vector(vector: Vector4<N>) -> Self
[src]
Creates a quaternion from a 4D vector. The quaternion scalar part corresponds to the w
vector component.
pub fn new(w: N, x: N, y: N, z: N) -> Self
[src]
Creates a new quaternion from its individual components. Note that the arguments order does not follow the storage order.
The storage order is [ x, y, z, w ]
.
pub fn from_parts<SB>(scalar: N, vector: Vector<N, U3, SB>) -> Self where
SB: Storage<N, U3>,
[src]
SB: Storage<N, U3>,
Creates a new quaternion from its scalar and vector parts. Note that the arguments order does not follow the storage order.
The storage order is [ vector, scalar ].
pub fn from_polar_decomposition<SB>(
scale: N,
theta: N,
axis: Unit<Vector<N, U3, SB>>
) -> Self where
SB: Storage<N, U3>,
[src]
scale: N,
theta: N,
axis: Unit<Vector<N, U3, SB>>
) -> Self where
SB: Storage<N, U3>,
Creates a new quaternion from its polar decomposition.
Note that axis
is assumed to be a unit vector.
pub fn identity() -> Self
[src]
The quaternion multiplicative identity.
Trait Implementations
impl<N: Debug + Real> Debug for Quaternion<N>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<N: Real + Eq> Eq for Quaternion<N>
[src]
impl<N: Real> PartialEq for Quaternion<N>
[src]
fn eq(&self, rhs: &Self) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<N: Real + Hash> Hash for Quaternion<N>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<N: Real> Copy for Quaternion<N>
[src]
impl<N: Real> Clone for Quaternion<N>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<N: Real + ApproxEq<Epsilon = N>> ApproxEq for Quaternion<N>
[src]
type Epsilon = N
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
The inverse of ApproxEq::ulps_eq
.
impl<N: Real + Display> Display for Quaternion<N>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<N: Real> One for Quaternion<N>
[src]
impl<N: Real> Zero for Quaternion<N>
[src]
fn zero() -> Self
[src]
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
Returns true
if self
is equal to the additive identity.
impl<N: Real + Rand> Rand for Quaternion<N>
[src]
fn rand<R: Rng>(rng: &mut R) -> Self
[src]
Generates a random instance of this type using the specified source of randomness. Read more
impl<N: Real> Index<usize> for Quaternion<N>
[src]
type Output = N
The returned type after indexing.
ⓘImportant traits for &'a mut Ifn index(&self, i: usize) -> &N
[src]
Performs the indexing (container[index]
) operation.
impl<N: Real> IndexMut<usize> for Quaternion<N>
[src]
ⓘImportant traits for &'a mut Ifn index_mut(&mut self, i: usize) -> &mut N
[src]
Performs the mutable indexing (container[index]
) operation.
impl<'a, 'b, N: Real> Add<&'b Quaternion<N>> for &'a Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the +
operator.
fn add(self, rhs: &'b Quaternion<N>) -> Self::Output
[src]
Performs the +
operation.
impl<'a, N: Real> Add<Quaternion<N>> for &'a Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the +
operator.
fn add(self, rhs: Quaternion<N>) -> Self::Output
[src]
Performs the +
operation.
impl<'b, N: Real> Add<&'b Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the +
operator.
fn add(self, rhs: &'b Quaternion<N>) -> Self::Output
[src]
Performs the +
operation.
impl<N: Real> Add<Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the +
operator.
fn add(self, rhs: Quaternion<N>) -> Self::Output
[src]
Performs the +
operation.
impl<'a, 'b, N: Real> Sub<&'b Quaternion<N>> for &'a Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b Quaternion<N>) -> Self::Output
[src]
Performs the -
operation.
impl<'a, N: Real> Sub<Quaternion<N>> for &'a Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the -
operator.
fn sub(self, rhs: Quaternion<N>) -> Self::Output
[src]
Performs the -
operation.
impl<'b, N: Real> Sub<&'b Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b Quaternion<N>) -> Self::Output
[src]
Performs the -
operation.
impl<N: Real> Sub<Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the -
operator.
fn sub(self, rhs: Quaternion<N>) -> Self::Output
[src]
Performs the -
operation.
impl<'a, 'b, N: Real> Mul<&'b Quaternion<N>> for &'a Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Quaternion<N>) -> Self::Output
[src]
Performs the *
operation.
impl<'a, N: Real> Mul<Quaternion<N>> for &'a Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quaternion<N>) -> Self::Output
[src]
Performs the *
operation.
impl<'b, N: Real> Mul<&'b Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Quaternion<N>) -> Self::Output
[src]
Performs the *
operation.
impl<N: Real> Mul<Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
type Output = Quaternion<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quaternion<N>) -> Self::Output
[src]
Performs the *
operation.
impl<N: Real> Mul<N> for Quaternion<N>
[src]
type Output = Quaternion<N>
The resulting type after applying the *
operator.
fn mul(self, n: N) -> Self::Output
[src]
Performs the *
operation.
impl<'a, N: Real> Mul<N> for &'a Quaternion<N>
[src]
type Output = Quaternion<N>
The resulting type after applying the *
operator.
fn mul(self, n: N) -> Self::Output
[src]
Performs the *
operation.
impl<N: Real> MulAssign<N> for Quaternion<N>
[src]
fn mul_assign(&mut self, n: N)
[src]
Performs the *=
operation.
impl<N: Real> Div<N> for Quaternion<N>
[src]
type Output = Quaternion<N>
The resulting type after applying the /
operator.
fn div(self, n: N) -> Self::Output
[src]
Performs the /
operation.
impl<'a, N: Real> Div<N> for &'a Quaternion<N>
[src]
type Output = Quaternion<N>
The resulting type after applying the /
operator.
fn div(self, n: N) -> Self::Output
[src]
Performs the /
operation.
impl<N: Real> DivAssign<N> for Quaternion<N>
[src]
fn div_assign(&mut self, n: N)
[src]
Performs the /=
operation.
impl Mul<Quaternion<f32>> for f32
[src]
type Output = Quaternion<f32>
The resulting type after applying the *
operator.
fn mul(self, right: Quaternion<f32>) -> Self::Output
[src]
Performs the *
operation.
impl<'b> Mul<&'b Quaternion<f32>> for f32
[src]
type Output = Quaternion<f32>
The resulting type after applying the *
operator.
fn mul(self, right: &'b Quaternion<f32>) -> Self::Output
[src]
Performs the *
operation.
impl Mul<Quaternion<f64>> for f64
[src]
type Output = Quaternion<f64>
The resulting type after applying the *
operator.
fn mul(self, right: Quaternion<f64>) -> Self::Output
[src]
Performs the *
operation.
impl<'b> Mul<&'b Quaternion<f64>> for f64
[src]
type Output = Quaternion<f64>
The resulting type after applying the *
operator.
fn mul(self, right: &'b Quaternion<f64>) -> Self::Output
[src]
Performs the *
operation.
impl<N: Real> Neg for Quaternion<N>
[src]
type Output = Quaternion<N>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Performs the unary -
operation.
impl<'a, N: Real> Neg for &'a Quaternion<N>
[src]
type Output = Quaternion<N>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Performs the unary -
operation.
impl<'b, N: Real> AddAssign<&'b Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
fn add_assign(&mut self, rhs: &'b Quaternion<N>)
[src]
Performs the +=
operation.
impl<N: Real> AddAssign<Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
fn add_assign(&mut self, rhs: Quaternion<N>)
[src]
Performs the +=
operation.
impl<'b, N: Real> SubAssign<&'b Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
fn sub_assign(&mut self, rhs: &'b Quaternion<N>)
[src]
Performs the -=
operation.
impl<N: Real> SubAssign<Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
fn sub_assign(&mut self, rhs: Quaternion<N>)
[src]
Performs the -=
operation.
impl<'b, N: Real> MulAssign<&'b Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
fn mul_assign(&mut self, rhs: &'b Quaternion<N>)
[src]
Performs the *=
operation.
impl<N: Real> MulAssign<Quaternion<N>> for Quaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U4, U1>,
fn mul_assign(&mut self, rhs: Quaternion<N>)
[src]
Performs the *=
operation.
impl<N: Real> Identity<Multiplicative> for Quaternion<N>
[src]
impl<N: Real> Identity<Additive> for Quaternion<N>
[src]
impl<N: Real> AbstractMagma<Multiplicative> for Quaternion<N>
[src]
fn operate(&self, rhs: &Self) -> Self
[src]
Performs an operation.
fn op(&self, O, lhs: &Self) -> Self
[src]
Performs specific operation.
impl<N: Real> AbstractMagma<Additive> for Quaternion<N>
[src]
fn operate(&self, rhs: &Self) -> Self
[src]
Performs an operation.
fn op(&self, O, lhs: &Self) -> Self
[src]
Performs specific operation.
impl<N: Real> Inverse<Additive> for Quaternion<N>
[src]
fn inverse(&self) -> Self
[src]
Returns the inverse of self
, relative to the operator O
.
fn inverse_mut(&mut self)
[src]
In-place inversin of self
.
impl<N: Real> AbstractSemigroup<Multiplicative> for Quaternion<N>
[src]
fn prop_is_associative_approx(args: (Self, Self, Self)) -> bool where
Self: ApproxEq,
[src]
Self: ApproxEq,
Returns true
if associativity holds for the given arguments. Approximate equality is used for verifications. Read more
fn prop_is_associative(args: (Self, Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
Returns true
if associativity holds for the given arguments.
impl<N: Real> AbstractMonoid<Multiplicative> for Quaternion<N>
[src]
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> bool where
Self: ApproxEq,
[src]
Self: ApproxEq,
Checks whether operating with the identity element is a no-op for the given argument. Approximate equality is used for verifications. Read more
fn prop_operating_identity_element_is_noop(args: (Self,)) -> bool where
Self: Eq,
[src]
Self: Eq,
Checks whether operating with the identity element is a no-op for the given argument. Read more
impl<N: Real> AbstractSemigroup<Additive> for Quaternion<N>
[src]
fn prop_is_associative_approx(args: (Self, Self, Self)) -> bool where
Self: ApproxEq,
[src]
Self: ApproxEq,
Returns true
if associativity holds for the given arguments. Approximate equality is used for verifications. Read more
fn prop_is_associative(args: (Self, Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
Returns true
if associativity holds for the given arguments.
impl<N: Real> AbstractQuasigroup<Additive> for Quaternion<N>
[src]
fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> bool where
Self: ApproxEq,
[src]
Self: ApproxEq,
Returns true
if latin squareness holds for the given arguments. Approximate equality is used for verifications. Read more
fn prop_inv_is_latin_square(args: (Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
Returns true
if latin squareness holds for the given arguments.
impl<N: Real> AbstractMonoid<Additive> for Quaternion<N>
[src]
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> bool where
Self: ApproxEq,
[src]
Self: ApproxEq,
Checks whether operating with the identity element is a no-op for the given argument. Approximate equality is used for verifications. Read more
fn prop_operating_identity_element_is_noop(args: (Self,)) -> bool where
Self: Eq,
[src]
Self: Eq,
Checks whether operating with the identity element is a no-op for the given argument. Read more
impl<N: Real> AbstractLoop<Additive> for Quaternion<N>
[src]
impl<N: Real> AbstractGroup<Additive> for Quaternion<N>
[src]
impl<N: Real> AbstractGroupAbelian<Additive> for Quaternion<N>
[src]
fn prop_is_commutative_approx(args: (Self, Self)) -> bool where
Self: ApproxEq,
[src]
Self: ApproxEq,
Returns true
if the operator is commutative for the given argument tuple. Approximate equality is used for verifications. Read more
fn prop_is_commutative(args: (Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
Returns true
if the operator is commutative for the given argument tuple.
impl<N: Real> AbstractModule for Quaternion<N>
[src]
type AbstractRing = N
The underlying scalar field.
fn multiply_by(&self, n: N) -> Self
[src]
Multiplies an element of the ring with an element of the module.
impl<N: Real> Module for Quaternion<N>
[src]
type Ring = N
The underlying scalar field.
impl<N: Real> VectorSpace for Quaternion<N>
[src]
type Field = N
The underlying scalar field.
impl<N: Real> FiniteDimVectorSpace for Quaternion<N>
[src]
fn dimension() -> usize
[src]
The vector space dimension.
fn canonical_basis_element(i: usize) -> Self
[src]
The i-the canonical basis element.
fn dot(&self, other: &Self) -> N
[src]
The dot product between two vectors.
ⓘImportant traits for &'a mut Iunsafe fn component_unchecked(&self, i: usize) -> &N
[src]
Same as &self[i]
but without bound-checking.
ⓘImportant traits for &'a mut Iunsafe fn component_unchecked_mut(&mut self, i: usize) -> &mut N
[src]
Same as &mut self[i]
but without bound-checking.
fn canonical_basis<F>(f: F) where
F: FnMut(&Self) -> bool,
[src]
F: FnMut(&Self) -> bool,
Applies the given closule to each element of this vector space's canonical basis. Stops if f
returns false
. Read more
impl<N: Real> NormedSpace for Quaternion<N>
[src]
fn norm_squared(&self) -> N
[src]
The squared norm of this vector.
fn norm(&self) -> N
[src]
The norm of this vector.
fn normalize(&self) -> Self
[src]
Returns a normalized version of this vector.
fn normalize_mut(&mut self) -> N
[src]
Normalizes this vector in-place and returns its norm.
fn try_normalize(&self, min_norm: N) -> Option<Self>
[src]
Returns a normalized version of this vector unless its norm as smaller or equal to eps
.
fn try_normalize_mut(&mut self, min_norm: N) -> Option<N>
[src]
Normalizes this vector in-place or does nothing if its norm is smaller or equal to eps
. Read more
impl<N1, N2> SubsetOf<Quaternion<N2>> for Quaternion<N1> where
N1: Real,
N2: Real + SupersetOf<N1>,
[src]
N1: Real,
N2: Real + SupersetOf<N1>,
fn to_superset(&self) -> Quaternion<N2>
[src]
The inclusion map: converts self
to the equivalent element of its superset.
fn is_in_subset(q: &Quaternion<N2>) -> bool
[src]
Checks if element
is actually part of the subset Self
(and can be converted to it).
unsafe fn from_superset_unchecked(q: &Quaternion<N2>) -> Self
[src]
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<N: Real> Deref for Quaternion<N>
[src]
type Target = IJKW<N>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.