[−][src]Struct versor::Quaternion
Represents a quaternion.
Implementations
impl Quaternion
[src]
pub fn from_cartesian(Vec3: Vec3) -> Quaternion
[src]
Computes the quaternion from a cartesian coordinate.
pub fn from_angles(l: f32, p: f32, g: f32) -> Quaternion
[src]
Computes the unit quaternion from a Euler rotation angles (λ, φ, γ)
.
pub fn to_angles(&self) -> (f32, f32, f32)
[src]
Computes the Euler rotation angles (λ, φ, γ)
.
pub fn length(&self) -> f32
[src]
Computes the length of self
.
pub fn dot(&self, rhs: &Quaternion) -> f32
[src]
Computes the dot product of self
and other
.
pub fn multiply(&self, rhs: &Quaternion) -> Quaternion
[src]
Element-wisely multiplies self
and other
.
Trait Implementations
impl Clone for Quaternion
[src]
fn clone(&self) -> Quaternion
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Quaternion
[src]
Auto Trait Implementations
impl RefUnwindSafe for Quaternion
impl Send for Quaternion
impl Sync for Quaternion
impl Unpin for Quaternion
impl UnwindSafe for Quaternion
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,