Struct mint::Quaternion
source · #[repr(C)]pub struct Quaternion<T> {
pub v: Vector3<T>,
pub s: T,
}
Expand description
Standard quaternion represented by the scalar and vector parts. Useful for representing rotation in 3D space. Corresponds to a right-handed rotation matrix.
Fields§
§v: Vector3<T>
Vector part of a quaternion.
s: T
Scalar part of a quaternion.
Trait Implementations§
source§impl<T> AsMut<[T; 4]> for Quaternion<T>
impl<T> AsMut<[T; 4]> for Quaternion<T>
source§impl<T> AsRef<[T; 4]> for Quaternion<T>
impl<T> AsRef<[T; 4]> for Quaternion<T>
source§impl<T: Clone> Clone for Quaternion<T>
impl<T: Clone> Clone for Quaternion<T>
source§fn clone(&self) -> Quaternion<T>
fn clone(&self) -> Quaternion<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for Quaternion<T>
impl<T: Debug> Debug for Quaternion<T>
source§impl<T> From<[T; 4]> for Quaternion<T>
impl<T> From<[T; 4]> for Quaternion<T>
source§impl<T> From<Quaternion<T>> for [T; 4]
impl<T> From<Quaternion<T>> for [T; 4]
source§fn from(quaternion: Quaternion<T>) -> [T; 4]
fn from(quaternion: Quaternion<T>) -> [T; 4]
Converts to this type from the input type.
source§impl<T: Hash> Hash for Quaternion<T>
impl<T: Hash> Hash for Quaternion<T>
source§impl<T> IntoMint for Quaternion<T>
impl<T> IntoMint for Quaternion<T>
§type MintType = Quaternion<T>
type MintType = Quaternion<T>
The mint type that this type is associated with.
source§impl<T: Ord> Ord for Quaternion<T>
impl<T: Ord> Ord for Quaternion<T>
source§fn cmp(&self, other: &Quaternion<T>) -> Ordering
fn cmp(&self, other: &Quaternion<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq for Quaternion<T>
impl<T: PartialEq> PartialEq for Quaternion<T>
source§fn eq(&self, other: &Quaternion<T>) -> bool
fn eq(&self, other: &Quaternion<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd for Quaternion<T>
impl<T: PartialOrd> PartialOrd for Quaternion<T>
source§fn partial_cmp(&self, other: &Quaternion<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Quaternion<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Quaternion<T>
impl<T: Eq> Eq for Quaternion<T>
impl<T> StructuralEq for Quaternion<T>
impl<T> StructuralPartialEq for Quaternion<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Quaternion<T>where
T: RefUnwindSafe,
impl<T> Send for Quaternion<T>where
T: Send,
impl<T> Sync for Quaternion<T>where
T: Sync,
impl<T> Unpin for Quaternion<T>where
T: Unpin,
impl<T> UnwindSafe for Quaternion<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more