Struct oxygen_quark::imaginary::quaternion::Quaternion
source · Fields
r: Fraction
Real component of the quaternion.
x: Fraction
i-component of the quaternion.
y: Fraction
j-component of the quaternion.
z: Fraction
k-component of the quaternion.
Implementations
sourceimpl Quaternion
impl Quaternion
sourcepub fn new(r: Fraction, x: Fraction, y: Fraction, z: Fraction) -> Quaternion
pub fn new(r: Fraction, x: Fraction, y: Fraction, z: Fraction) -> Quaternion
Generates a new Quaternion
.
sourcepub fn conjugate(&self) -> Quaternion
pub fn conjugate(&self) -> Quaternion
Returns the conjugate of the Quaternion
, another Quaternion
.
sourcepub fn scale(&self, scale: Fraction) -> Quaternion
pub fn scale(&self, scale: Fraction) -> Quaternion
Scales the Quaternion
. Returns a new Quaternion
.
Trait Implementations
sourceimpl Add<Quaternion> for Quaternion
impl Add<Quaternion> for Quaternion
type Output = Quaternion
type Output = Quaternion
The resulting type after applying the
+
operator.sourcefn add(self, other: Quaternion) -> Quaternion
fn add(self, other: Quaternion) -> Quaternion
Performs the
+
operation. Read moresourceimpl AddAssign<Quaternion> for Quaternion
impl AddAssign<Quaternion> for Quaternion
sourcefn add_assign(&mut self, other: Quaternion)
fn add_assign(&mut self, other: Quaternion)
Performs the
+=
operation. Read moresourceimpl Clone for Quaternion
impl Clone for Quaternion
sourcefn clone(&self) -> Quaternion
fn clone(&self) -> Quaternion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Quaternion
impl Debug for Quaternion
sourceimpl Display for Quaternion
impl Display for Quaternion
sourceimpl Div<Quaternion> for Quaternion
impl Div<Quaternion> for Quaternion
type Output = Quaternion
type Output = Quaternion
The resulting type after applying the
/
operator.sourcefn div(self, other: Quaternion) -> Quaternion
fn div(self, other: Quaternion) -> Quaternion
Performs the
/
operation. Read moresourceimpl DivAssign<Quaternion> for Quaternion
impl DivAssign<Quaternion> for Quaternion
sourcefn div_assign(&mut self, other: Quaternion)
fn div_assign(&mut self, other: Quaternion)
Performs the
/=
operation. Read moresourceimpl Mul<Quaternion> for Quaternion
impl Mul<Quaternion> for Quaternion
type Output = Quaternion
type Output = Quaternion
The resulting type after applying the
*
operator.sourcefn mul(self, other: Quaternion) -> Quaternion
fn mul(self, other: Quaternion) -> Quaternion
Performs the
*
operation. Read moresourceimpl MulAssign<Quaternion> for Quaternion
impl MulAssign<Quaternion> for Quaternion
sourcefn mul_assign(&mut self, other: Quaternion)
fn mul_assign(&mut self, other: Quaternion)
Performs the
*=
operation. Read moresourceimpl Neg for Quaternion
impl Neg for Quaternion
type Output = Quaternion
type Output = Quaternion
The resulting type after applying the
-
operator.sourcefn neg(self) -> Quaternion
fn neg(self) -> Quaternion
Performs the unary
-
operation. Read moresourceimpl Ord for Quaternion
impl Ord for Quaternion
sourcefn cmp(&self, other: &Quaternion) -> Ordering
fn cmp(&self, other: &Quaternion) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Quaternion> for Quaternion
impl PartialEq<Quaternion> for Quaternion
sourcefn eq(&self, other: &Quaternion) -> bool
fn eq(&self, other: &Quaternion) -> bool
sourceimpl PartialOrd<Quaternion> for Quaternion
impl PartialOrd<Quaternion> for Quaternion
sourcefn partial_cmp(&self, other: &Quaternion) -> Option<Ordering>
fn partial_cmp(&self, other: &Quaternion) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl Sub<Quaternion> for Quaternion
impl Sub<Quaternion> for Quaternion
type Output = Quaternion
type Output = Quaternion
The resulting type after applying the
-
operator.sourcefn sub(self, other: Quaternion) -> Quaternion
fn sub(self, other: Quaternion) -> Quaternion
Performs the
-
operation. Read moresourceimpl SubAssign<Quaternion> for Quaternion
impl SubAssign<Quaternion> for Quaternion
sourcefn sub_assign(&mut self, other: Quaternion)
fn sub_assign(&mut self, other: Quaternion)
Performs the
-=
operation. Read moreimpl Copy for Quaternion
impl Eq for Quaternion
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more