#[repr(C)]pub struct Quaternion<T>(pub T, pub T, pub T, pub T);Expand description
Arbitrary rotating
Tuple Fields§
§0: T§1: T§2: T§3: TImplementations§
Source§impl<T> Quaternion<T>
impl<T> Quaternion<T>
Sourcepub fn new(rad: T, axis: Vector3<T>) -> Self
pub fn new(rad: T, axis: Vector3<T>) -> Self
Creates new quaternion from rotation axis and angle in radian.
Sourcepub fn lerp(&self, other: &Self, t: T) -> Self
pub fn lerp(&self, other: &Self, t: T) -> Self
Calculates the lerp-ed quaternion between 2 quaternions by t.
Trait Implementations§
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 duplicate 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<Quaternion<T>> for Matrix3<T>
impl<T> From<Quaternion<T>> for Matrix3<T>
Source§fn from(Quaternion: Quaternion<T>) -> Self
fn from(Quaternion: Quaternion<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<Quaternion<T>> for Matrix4<T>
impl<T> From<Quaternion<T>> for Matrix4<T>
Source§fn from(Quaternion: Quaternion<T>) -> Self
fn from(Quaternion: Quaternion<T>) -> Self
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> Mul for Quaternion<T>
impl<T> Mul for Quaternion<T>
Source§type Output = Quaternion<T>
type Output = Quaternion<T>
The resulting type after applying the
* operator.Source§impl<T: Neg<Output = T>> Neg for Quaternion<T>
impl<T: Neg<Output = T>> Neg for Quaternion<T>
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§impl<T: PartialOrd> PartialOrd for Quaternion<T>
impl<T: PartialOrd> PartialOrd for Quaternion<T>
impl<T: Copy> Copy for Quaternion<T>
impl<T: Eq> Eq for Quaternion<T>
impl<T> StructuralPartialEq for Quaternion<T>
Auto Trait Implementations§
impl<T> Freeze for Quaternion<T>where
T: Freeze,
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