Struct cgmath::Quaternion
source · #[repr(C)]pub struct Quaternion<S> {
pub s: S,
pub v: Vector3<S>,
}
Expand description
A quaternion in scalar/vector form.
This type is marked as #[repr(C)]
.
Fields§
§s: S
The scalar part of the quaternion.
v: Vector3<S>
The vector part of the quaternion.
Implementations§
source§impl<S: BaseFloat> Quaternion<S>
impl<S: BaseFloat> Quaternion<S>
sourcepub fn new(w: S, xi: S, yj: S, zk: S) -> Quaternion<S>
pub fn new(w: S, xi: S, yj: S, zk: S) -> Quaternion<S>
Construct a new quaternion from one scalar component and three imaginary components.
sourcepub fn from_sv(s: S, v: Vector3<S>) -> Quaternion<S>
pub fn from_sv(s: S, v: Vector3<S>) -> Quaternion<S>
Construct a new quaternion from a scalar and a vector.
sourcepub fn from_arc(
src: Vector3<S>,
dst: Vector3<S>,
fallback: Option<Vector3<S>>
) -> Quaternion<S>
pub fn from_arc( src: Vector3<S>, dst: Vector3<S>, fallback: Option<Vector3<S>> ) -> Quaternion<S>
Construct a new quaternion as a closest arc between two vectors
Return the closest rotation that turns src
vector into dst
.
- [Related StackOverflow question] (http://stackoverflow.com/questions/1171849/finding-quaternion-representing-the-rotation-from-one-vector-to-another)
- [Ogre implementation for normalized vectors] (https://bitbucket.org/sinbad/ogre/src/9db75e3ba05c/OgreMain/include/OgreVector3.h?fileviewer=file-view-default#cl-651)
sourcepub fn conjugate(self) -> Quaternion<S>
pub fn conjugate(self) -> Quaternion<S>
The conjugate of the quaternion.
sourcepub fn nlerp(self, other: Quaternion<S>, amount: S) -> Quaternion<S>
pub fn nlerp(self, other: Quaternion<S>, amount: S) -> Quaternion<S>
Do a normalized linear interpolation with other
, by amount
.
sourcepub fn slerp(self, other: Quaternion<S>, amount: S) -> Quaternion<S>
pub fn slerp(self, other: Quaternion<S>, amount: S) -> Quaternion<S>
Spherical Linear Intoperlation
Return the spherical linear interpolation between the quaternion and
other
. Both quaternions should be normalized first.
Performance notes
The acos
operation used in slerp
is an expensive operation, so
unless your quarternions are far away from each other it’s generally
more advisable to use nlerp
when you know your rotations are going
to be small.
- [Understanding Slerp, Then Not Using It] (http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/)
- [Arcsynthesis OpenGL tutorial] (http://www.arcsynthesis.org/gltut/Positioning/Tut08%20Interpolation.html)
Trait Implementations§
source§impl<'a, 'b, S: BaseFloat> Add<&'a Quaternion<S>> for &'b Quaternion<S>
impl<'a, 'b, S: BaseFloat> Add<&'a Quaternion<S>> for &'b Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
+
operator.source§fn add(self, other: &'a Quaternion<S>) -> Quaternion<S>
fn add(self, other: &'a Quaternion<S>) -> Quaternion<S>
+
operation. Read moresource§impl<'a, S: BaseFloat> Add<&'a Quaternion<S>> for Quaternion<S>
impl<'a, S: BaseFloat> Add<&'a Quaternion<S>> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
+
operator.source§fn add(self, other: &'a Quaternion<S>) -> Quaternion<S>
fn add(self, other: &'a Quaternion<S>) -> Quaternion<S>
+
operation. Read moresource§impl<'a, S: BaseFloat> Add<Quaternion<S>> for &'a Quaternion<S>
impl<'a, S: BaseFloat> Add<Quaternion<S>> for &'a Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
+
operator.source§fn add(self, other: Quaternion<S>) -> Quaternion<S>
fn add(self, other: Quaternion<S>) -> Quaternion<S>
+
operation. Read moresource§impl<S: BaseFloat> Add<Quaternion<S>> for Quaternion<S>
impl<S: BaseFloat> Add<Quaternion<S>> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
+
operator.source§fn add(self, other: Quaternion<S>) -> Quaternion<S>
fn add(self, other: Quaternion<S>) -> Quaternion<S>
+
operation. Read moresource§impl<S: BaseFloat + AddAssign<S>> AddAssign<Quaternion<S>> for Quaternion<S>
impl<S: BaseFloat + AddAssign<S>> AddAssign<Quaternion<S>> for Quaternion<S>
source§fn add_assign(&mut self, other: Quaternion<S>)
fn add_assign(&mut self, other: Quaternion<S>)
+=
operation. Read moresource§impl<S: BaseFloat> ApproxEq for Quaternion<S>
impl<S: BaseFloat> ApproxEq for Quaternion<S>
source§fn default_epsilon() -> S::Epsilon
fn default_epsilon() -> S::Epsilon
source§fn default_max_relative() -> S::Epsilon
fn default_max_relative() -> S::Epsilon
source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
source§fn relative_eq(
&self,
other: &Self,
epsilon: S::Epsilon,
max_relative: S::Epsilon
) -> bool
fn relative_eq( &self, other: &Self, epsilon: S::Epsilon, max_relative: S::Epsilon ) -> bool
source§fn ulps_eq(&self, other: &Self, epsilon: S::Epsilon, max_ulps: u32) -> bool
fn ulps_eq(&self, other: &Self, epsilon: S::Epsilon, max_ulps: u32) -> bool
source§impl<S: BaseFloat> AsMut<(S, S, S, S)> for Quaternion<S>
impl<S: BaseFloat> AsMut<(S, S, S, S)> for Quaternion<S>
source§fn as_mut(&mut self) -> &mut (S, S, S, S)
fn as_mut(&mut self) -> &mut (S, S, S, S)
source§impl<S: BaseFloat> AsRef<(S, S, S, S)> for Quaternion<S>
impl<S: BaseFloat> AsRef<(S, S, S, S)> for Quaternion<S>
source§fn as_ref(&self) -> &(S, S, S, S)
fn as_ref(&self) -> &(S, S, S, S)
source§impl<S: Clone> Clone for Quaternion<S>
impl<S: Clone> Clone for Quaternion<S>
source§fn clone(&self) -> Quaternion<S>
fn clone(&self) -> Quaternion<S>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<S: Debug> Debug for Quaternion<S>
impl<S: Debug> Debug for Quaternion<S>
source§impl<S: Decodable> Decodable for Quaternion<S>
impl<S: Decodable> Decodable for Quaternion<S>
source§impl<'a> Div<&'a Quaternion<f32>> for f32
impl<'a> Div<&'a Quaternion<f32>> for f32
§type Output = Quaternion<f32>
type Output = Quaternion<f32>
/
operator.source§fn div(self, other: &'a Quaternion<f32>) -> Quaternion<f32>
fn div(self, other: &'a Quaternion<f32>) -> Quaternion<f32>
/
operation. Read moresource§impl<'a> Div<&'a Quaternion<f64>> for f64
impl<'a> Div<&'a Quaternion<f64>> for f64
§type Output = Quaternion<f64>
type Output = Quaternion<f64>
/
operator.source§fn div(self, other: &'a Quaternion<f64>) -> Quaternion<f64>
fn div(self, other: &'a Quaternion<f64>) -> Quaternion<f64>
/
operation. Read moresource§impl Div<Quaternion<f32>> for f32
impl Div<Quaternion<f32>> for f32
§type Output = Quaternion<f32>
type Output = Quaternion<f32>
/
operator.source§fn div(self, other: Quaternion<f32>) -> Quaternion<f32>
fn div(self, other: Quaternion<f32>) -> Quaternion<f32>
/
operation. Read moresource§impl Div<Quaternion<f64>> for f64
impl Div<Quaternion<f64>> for f64
§type Output = Quaternion<f64>
type Output = Quaternion<f64>
/
operator.source§fn div(self, other: Quaternion<f64>) -> Quaternion<f64>
fn div(self, other: Quaternion<f64>) -> Quaternion<f64>
/
operation. Read moresource§impl<'a, S: BaseFloat> Div<S> for &'a Quaternion<S>
impl<'a, S: BaseFloat> Div<S> for &'a Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
/
operator.source§fn div(self, other: S) -> Quaternion<S>
fn div(self, other: S) -> Quaternion<S>
/
operation. Read moresource§impl<S: BaseFloat> Div<S> for Quaternion<S>
impl<S: BaseFloat> Div<S> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
/
operator.source§fn div(self, other: S) -> Quaternion<S>
fn div(self, other: S) -> Quaternion<S>
/
operation. Read moresource§impl<S: BaseFloat + DivAssign<S>> DivAssign<S> for Quaternion<S>
impl<S: BaseFloat + DivAssign<S>> DivAssign<S> for Quaternion<S>
source§fn div_assign(&mut self, scalar: S)
fn div_assign(&mut self, scalar: S)
/=
operation. Read moresource§impl<S: Encodable> Encodable for Quaternion<S>
impl<S: Encodable> Encodable for Quaternion<S>
source§impl<'a, S: BaseFloat> From<&'a [S; 4]> for &'a Quaternion<S>
impl<'a, S: BaseFloat> From<&'a [S; 4]> for &'a Quaternion<S>
source§fn from(v: &'a [S; 4]) -> &'a Quaternion<S>
fn from(v: &'a [S; 4]) -> &'a Quaternion<S>
source§impl<'a, S: BaseFloat> From<&'a (S, S, S, S)> for &'a Quaternion<S>
impl<'a, S: BaseFloat> From<&'a (S, S, S, S)> for &'a Quaternion<S>
source§fn from(v: &'a (S, S, S, S)) -> &'a Quaternion<S>
fn from(v: &'a (S, S, S, S)) -> &'a Quaternion<S>
source§impl<'a, S: BaseFloat> From<&'a mut [S; 4]> for &'a mut Quaternion<S>
impl<'a, S: BaseFloat> From<&'a mut [S; 4]> for &'a mut Quaternion<S>
source§fn from(v: &'a mut [S; 4]) -> &'a mut Quaternion<S>
fn from(v: &'a mut [S; 4]) -> &'a mut Quaternion<S>
source§impl<'a, S: BaseFloat> From<&'a mut (S, S, S, S)> for &'a mut Quaternion<S>
impl<'a, S: BaseFloat> From<&'a mut (S, S, S, S)> for &'a mut Quaternion<S>
source§fn from(v: &'a mut (S, S, S, S)) -> &'a mut Quaternion<S>
fn from(v: &'a mut (S, S, S, S)) -> &'a mut Quaternion<S>
source§impl<S: BaseFloat> From<[S; 4]> for Quaternion<S>
impl<S: BaseFloat> From<[S; 4]> for Quaternion<S>
source§fn from(v: [S; 4]) -> Quaternion<S>
fn from(v: [S; 4]) -> Quaternion<S>
source§impl<S: BaseFloat> From<(S, S, S, S)> for Quaternion<S>
impl<S: BaseFloat> From<(S, S, S, S)> for Quaternion<S>
source§fn from(v: (S, S, S, S)) -> Quaternion<S>
fn from(v: (S, S, S, S)) -> Quaternion<S>
source§impl<S: BaseFloat> From<Basis3<S>> for Quaternion<S>
impl<S: BaseFloat> From<Basis3<S>> for Quaternion<S>
source§fn from(b: Basis3<S>) -> Quaternion<S>
fn from(b: Basis3<S>) -> Quaternion<S>
source§impl<A> From<Euler<A>> for Quaternion<<A as Angle>::Unitless>where
A: Angle + Into<Rad<<A as Angle>::Unitless>>,
impl<A> From<Euler<A>> for Quaternion<<A as Angle>::Unitless>where A: Angle + Into<Rad<<A as Angle>::Unitless>>,
source§impl<S: BaseFloat> From<Matrix3<S>> for Quaternion<S>
impl<S: BaseFloat> From<Matrix3<S>> for Quaternion<S>
source§fn from(mat: Matrix3<S>) -> Quaternion<S>
fn from(mat: Matrix3<S>) -> Quaternion<S>
Convert the matrix to a quaternion
source§impl<S: BaseFloat> From<Quaternion<S>> for Basis3<S>
impl<S: BaseFloat> From<Quaternion<S>> for Basis3<S>
source§fn from(quat: Quaternion<S>) -> Basis3<S>
fn from(quat: Quaternion<S>) -> Basis3<S>
source§impl<S: BaseFloat> From<Quaternion<S>> for Matrix3<S>
impl<S: BaseFloat> From<Quaternion<S>> for Matrix3<S>
source§fn from(quat: Quaternion<S>) -> Matrix3<S>
fn from(quat: Quaternion<S>) -> Matrix3<S>
Convert the quaternion to a 3 x 3 rotation matrix.
source§impl<S: BaseFloat> From<Quaternion<S>> for Matrix4<S>
impl<S: BaseFloat> From<Quaternion<S>> for Matrix4<S>
source§fn from(quat: Quaternion<S>) -> Matrix4<S>
fn from(quat: Quaternion<S>) -> Matrix4<S>
Convert the quaternion to a 4 x 4 rotation matrix.
source§impl<S: BaseFloat> InnerSpace for Quaternion<S>
impl<S: BaseFloat> InnerSpace for Quaternion<S>
source§fn dot(self, other: Quaternion<S>) -> S
fn dot(self, other: Quaternion<S>) -> S
source§fn is_perpendicular(self, other: Self) -> bool
fn is_perpendicular(self, other: Self) -> bool
true
if the vector is perpendicular (at right angles) to the
other vector.source§fn magnitude2(self) -> Self::Scalar
fn magnitude2(self) -> Self::Scalar
source§fn angle(self, other: Self) -> Rad<Self::Scalar>
fn angle(self, other: Self) -> Rad<Self::Scalar>
source§fn normalize(self) -> Self
fn normalize(self) -> Self
1
.source§fn normalize_to(self, magnitude: Self::Scalar) -> Self
fn normalize_to(self, magnitude: Self::Scalar) -> Self
source§impl<S: BaseFloat> Into<(S, S, S, S)> for Quaternion<S>
impl<S: BaseFloat> Into<(S, S, S, S)> for Quaternion<S>
source§fn into(self) -> (S, S, S, S)
fn into(self) -> (S, S, S, S)
source§impl<S: BaseFloat> MetricSpace for Quaternion<S>
impl<S: BaseFloat> MetricSpace for Quaternion<S>
source§impl<'a, 'b, S: BaseFloat> Mul<&'a Quaternion<S>> for &'b Quaternion<S>
impl<'a, 'b, S: BaseFloat> Mul<&'a Quaternion<S>> for &'b Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
*
operator.source§fn mul(self, other: &'a Quaternion<S>) -> Quaternion<S>
fn mul(self, other: &'a Quaternion<S>) -> Quaternion<S>
*
operation. Read moresource§impl<'a, S: BaseFloat> Mul<&'a Quaternion<S>> for Quaternion<S>
impl<'a, S: BaseFloat> Mul<&'a Quaternion<S>> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
*
operator.source§fn mul(self, other: &'a Quaternion<S>) -> Quaternion<S>
fn mul(self, other: &'a Quaternion<S>) -> Quaternion<S>
*
operation. Read moresource§impl<'a> Mul<&'a Quaternion<f32>> for f32
impl<'a> Mul<&'a Quaternion<f32>> for f32
§type Output = Quaternion<f32>
type Output = Quaternion<f32>
*
operator.source§fn mul(self, other: &'a Quaternion<f32>) -> Quaternion<f32>
fn mul(self, other: &'a Quaternion<f32>) -> Quaternion<f32>
*
operation. Read moresource§impl<'a> Mul<&'a Quaternion<f64>> for f64
impl<'a> Mul<&'a Quaternion<f64>> for f64
§type Output = Quaternion<f64>
type Output = Quaternion<f64>
*
operator.source§fn mul(self, other: &'a Quaternion<f64>) -> Quaternion<f64>
fn mul(self, other: &'a Quaternion<f64>) -> Quaternion<f64>
*
operation. Read moresource§impl<'a, S: BaseFloat> Mul<Quaternion<S>> for &'a Quaternion<S>
impl<'a, S: BaseFloat> Mul<Quaternion<S>> for &'a Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
*
operator.source§fn mul(self, other: Quaternion<S>) -> Quaternion<S>
fn mul(self, other: Quaternion<S>) -> Quaternion<S>
*
operation. Read moresource§impl<S: BaseFloat> Mul<Quaternion<S>> for Quaternion<S>
impl<S: BaseFloat> Mul<Quaternion<S>> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
*
operator.source§fn mul(self, other: Quaternion<S>) -> Quaternion<S>
fn mul(self, other: Quaternion<S>) -> Quaternion<S>
*
operation. Read moresource§impl Mul<Quaternion<f32>> for f32
impl Mul<Quaternion<f32>> for f32
§type Output = Quaternion<f32>
type Output = Quaternion<f32>
*
operator.source§fn mul(self, other: Quaternion<f32>) -> Quaternion<f32>
fn mul(self, other: Quaternion<f32>) -> Quaternion<f32>
*
operation. Read moresource§impl Mul<Quaternion<f64>> for f64
impl Mul<Quaternion<f64>> for f64
§type Output = Quaternion<f64>
type Output = Quaternion<f64>
*
operator.source§fn mul(self, other: Quaternion<f64>) -> Quaternion<f64>
fn mul(self, other: Quaternion<f64>) -> Quaternion<f64>
*
operation. Read moresource§impl<'a, S: BaseFloat> Mul<S> for &'a Quaternion<S>
impl<'a, S: BaseFloat> Mul<S> for &'a Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
*
operator.source§fn mul(self, other: S) -> Quaternion<S>
fn mul(self, other: S) -> Quaternion<S>
*
operation. Read moresource§impl<S: BaseFloat> Mul<S> for Quaternion<S>
impl<S: BaseFloat> Mul<S> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
*
operator.source§fn mul(self, other: S) -> Quaternion<S>
fn mul(self, other: S) -> Quaternion<S>
*
operation. Read moresource§impl<S: BaseFloat + MulAssign<S>> MulAssign<S> for Quaternion<S>
impl<S: BaseFloat + MulAssign<S>> MulAssign<S> for Quaternion<S>
source§fn mul_assign(&mut self, scalar: S)
fn mul_assign(&mut self, scalar: S)
*=
operation. Read moresource§impl<'a, S: BaseFloat> Neg for &'a Quaternion<S>
impl<'a, S: BaseFloat> Neg for &'a Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
-
operator.source§fn neg(self) -> Quaternion<S>
fn neg(self) -> Quaternion<S>
-
operation. Read moresource§impl<S: BaseFloat> Neg for Quaternion<S>
impl<S: BaseFloat> Neg for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
-
operator.source§fn neg(self) -> Quaternion<S>
fn neg(self) -> Quaternion<S>
-
operation. Read moresource§impl<S: BaseFloat> One for Quaternion<S>
impl<S: BaseFloat> One for Quaternion<S>
source§fn one() -> Quaternion<S>
fn one() -> Quaternion<S>
source§impl<S: PartialEq> PartialEq<Quaternion<S>> for Quaternion<S>
impl<S: PartialEq> PartialEq<Quaternion<S>> for Quaternion<S>
source§fn eq(&self, other: &Quaternion<S>) -> bool
fn eq(&self, other: &Quaternion<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'a, S: BaseFloat> Rem<S> for &'a Quaternion<S>
impl<'a, S: BaseFloat> Rem<S> for &'a Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
%
operator.source§fn rem(self, other: S) -> Quaternion<S>
fn rem(self, other: S) -> Quaternion<S>
%
operation. Read moresource§impl<S: BaseFloat> Rem<S> for Quaternion<S>
impl<S: BaseFloat> Rem<S> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
%
operator.source§fn rem(self, other: S) -> Quaternion<S>
fn rem(self, other: S) -> Quaternion<S>
%
operation. Read moresource§impl<S: BaseFloat + RemAssign<S>> RemAssign<S> for Quaternion<S>
impl<S: BaseFloat + RemAssign<S>> RemAssign<S> for Quaternion<S>
source§fn rem_assign(&mut self, scalar: S)
fn rem_assign(&mut self, scalar: S)
%=
operation. Read moresource§impl<S: BaseFloat> Rotation<Point3<S>> for Quaternion<S>
impl<S: BaseFloat> Rotation<Point3<S>> for Quaternion<S>
source§fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Quaternion<S>
fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Quaternion<S>
source§fn between_vectors(a: Vector3<S>, b: Vector3<S>) -> Quaternion<S>
fn between_vectors(a: Vector3<S>, b: Vector3<S>) -> Quaternion<S>
source§fn rotate_vector(&self, vec: Vector3<S>) -> Vector3<S>
fn rotate_vector(&self, vec: Vector3<S>) -> Vector3<S>
source§fn invert(&self) -> Quaternion<S>
fn invert(&self) -> Quaternion<S>
r * r.invert()
is the identity.source§fn rotate_point(&self, point: P) -> P
fn rotate_point(&self, point: P) -> P
source§impl<S: BaseFloat> Rotation3<S> for Quaternion<S>
impl<S: BaseFloat> Rotation3<S> for Quaternion<S>
source§fn from_axis_angle<A: Into<Rad<S>>>(axis: Vector3<S>, angle: A) -> Quaternion<S>
fn from_axis_angle<A: Into<Rad<S>>>(axis: Vector3<S>, angle: A) -> Quaternion<S>
source§fn from_angle_x<A: Into<Rad<S>>>(theta: A) -> Self
fn from_angle_x<A: Into<Rad<S>>>(theta: A) -> Self
x
axis (pitch).source§fn from_angle_y<A: Into<Rad<S>>>(theta: A) -> Self
fn from_angle_y<A: Into<Rad<S>>>(theta: A) -> Self
y
axis (yaw).source§fn from_angle_z<A: Into<Rad<S>>>(theta: A) -> Self
fn from_angle_z<A: Into<Rad<S>>>(theta: A) -> Self
z
axis (roll).source§impl<'a, 'b, S: BaseFloat> Sub<&'a Quaternion<S>> for &'b Quaternion<S>
impl<'a, 'b, S: BaseFloat> Sub<&'a Quaternion<S>> for &'b Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
-
operator.source§fn sub(self, other: &'a Quaternion<S>) -> Quaternion<S>
fn sub(self, other: &'a Quaternion<S>) -> Quaternion<S>
-
operation. Read moresource§impl<'a, S: BaseFloat> Sub<&'a Quaternion<S>> for Quaternion<S>
impl<'a, S: BaseFloat> Sub<&'a Quaternion<S>> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
-
operator.source§fn sub(self, other: &'a Quaternion<S>) -> Quaternion<S>
fn sub(self, other: &'a Quaternion<S>) -> Quaternion<S>
-
operation. Read moresource§impl<'a, S: BaseFloat> Sub<Quaternion<S>> for &'a Quaternion<S>
impl<'a, S: BaseFloat> Sub<Quaternion<S>> for &'a Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
-
operator.source§fn sub(self, other: Quaternion<S>) -> Quaternion<S>
fn sub(self, other: Quaternion<S>) -> Quaternion<S>
-
operation. Read moresource§impl<S: BaseFloat> Sub<Quaternion<S>> for Quaternion<S>
impl<S: BaseFloat> Sub<Quaternion<S>> for Quaternion<S>
§type Output = Quaternion<S>
type Output = Quaternion<S>
-
operator.source§fn sub(self, other: Quaternion<S>) -> Quaternion<S>
fn sub(self, other: Quaternion<S>) -> Quaternion<S>
-
operation. Read moresource§impl<S: BaseFloat + SubAssign<S>> SubAssign<Quaternion<S>> for Quaternion<S>
impl<S: BaseFloat + SubAssign<S>> SubAssign<Quaternion<S>> for Quaternion<S>
source§fn sub_assign(&mut self, other: Quaternion<S>)
fn sub_assign(&mut self, other: Quaternion<S>)
-=
operation. Read more