#[repr(C)]pub struct Quaternion {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
§w: f32
Implementations§
Source§impl Quaternion
impl Quaternion
pub const fn new(x: f32, y: f32, z: f32, w: f32) -> Quaternion
pub const fn identity() -> Quaternion
Sourcepub fn from_euler(euler_angles: Vector3) -> Quaternion
pub fn from_euler(euler_angles: Vector3) -> Quaternion
Construct a new quaternion from the given rotations about each axis
Sourcepub fn normalized(&self) -> Quaternion
pub fn normalized(&self) -> Quaternion
Produce a normalized copy of the quaternion
Trait Implementations§
Source§impl Clone for Quaternion
impl Clone for Quaternion
Source§fn clone(&self) -> Quaternion
fn clone(&self) -> Quaternion
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 Debug for Quaternion
impl Debug for Quaternion
Source§impl Mul<Vector3> for Quaternion
impl Mul<Vector3> for Quaternion
Source§impl Mul for Quaternion
impl Mul for Quaternion
Source§type Output = Quaternion
type Output = Quaternion
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: Quaternion) -> Quaternion
fn mul(self, rhs: Quaternion) -> Quaternion
Performs the
*
operation. Read moreimpl Copy for Quaternion
Auto Trait Implementations§
impl Freeze for Quaternion
impl RefUnwindSafe for Quaternion
impl Send for Quaternion
impl Sync for Quaternion
impl Unpin for Quaternion
impl UnwindSafe for Quaternion
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