[][src]Struct versor::Quaternion

pub struct 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]

impl Copy for Quaternion[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.