#[repr(C)]pub struct DQuat {
pub x: f64,
pub y: f64,
pub z: f64,
pub s: f64,
}
Expand description
Double-precision quaternion.
Fields§
§x: f64
§y: f64
§z: f64
§s: f64
Implementations§
source§impl DQuat
impl DQuat
sourcepub fn euler(angles: DVec3) -> Self
pub fn euler(angles: DVec3) -> 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
.
sourcepub fn axis_angle(axis: DVec3, angle: f64) -> Self
pub fn axis_angle(axis: DVec3, angle: f64) -> Self
Constructor for a rotation around axis
by angle
radians.
axis
need not be normalized.
Trait Implementations§
source§impl ApproxEq for DQuat
impl ApproxEq for DQuat
source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
source§fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
source§impl MulAssign<DQuat> for DQuat
impl MulAssign<DQuat> for DQuat
source§fn mul_assign(&mut self, rhs: DQuat)
fn mul_assign(&mut self, rhs: DQuat)
Performs the
*=
operation. Read moresource§impl PartialEq<DQuat> for DQuat
impl PartialEq<DQuat> for DQuat
impl Copy for DQuat
impl StructuralPartialEq for DQuat
Auto Trait Implementations§
impl RefUnwindSafe for DQuat
impl Send for DQuat
impl Sync for DQuat
impl Unpin for DQuat
impl UnwindSafe for DQuat
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