#[repr(C)]pub struct Rotation {
pub x: f32,
pub y: f32,
pub z: f32,
pub s: f32,
}
Expand description
Single-precision quaternion.
Fields§
§x: f32
§y: f32
§z: f32
§s: f32
Implementations§
Source§impl Rotation
impl Rotation
Sourcepub fn euler(angles: Vector) -> Self
pub fn euler(angles: Vector) -> Self
Constructor for a rotation defined by a set of Euler angles
The rotation order is Z, then X, then Y. From the point of the
object, this is equivalent to a yaw in angles.y
, a pitch in
angles.x
, and a roll in angles.z
.
Trait Implementations§
Source§impl MulAssign for Rotation
impl MulAssign for Rotation
Source§fn mul_assign(&mut self, rhs: Rotation)
fn mul_assign(&mut self, rhs: Rotation)
Performs the
*=
operation. Read moreimpl Copy for Rotation
impl StructuralPartialEq for Rotation
Auto Trait Implementations§
impl Freeze for Rotation
impl RefUnwindSafe for Rotation
impl Send for Rotation
impl Sync for Rotation
impl Unpin for Rotation
impl UnwindSafe for Rotation
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