Expand description
A 2-dimensional rotation matrix.
Implementations§
source§impl<N: Real> Rotation2<N>
impl<N: Real> Rotation2<N>
sourcepub fn from_scaled_axis<SB: Storage<N, U1>>(
axisangle: Vector<N, U1, SB>
) -> Self
pub fn from_scaled_axis<SB: Storage<N, U1>>(
axisangle: Vector<N, U1, SB>
) -> Self
Builds a 2 dimensional rotation matrix from an angle in radian wrapped in a 1-dimensional vector.
Equivalent to Self::new(axisangle[0])
.
source§impl<N: Real> Rotation2<N>
impl<N: Real> Rotation2<N>
sourcepub fn angle_to(&self, other: &Rotation2<N>) -> N
pub fn angle_to(&self, other: &Rotation2<N>) -> N
The rotation angle needed to make self
and other
coincide.
sourcepub fn rotation_to(&self, other: &Rotation2<N>) -> Rotation2<N>
pub fn rotation_to(&self, other: &Rotation2<N>) -> Rotation2<N>
The rotation matrix needed to make self
and other
coincide.
The result is such that: self.rotation_to(other) * self == other
.
sourcepub fn powf(&self, n: N) -> Rotation2<N>
pub fn powf(&self, n: N) -> Rotation2<N>
Raise the quaternion to a given floating power, i.e., returns the rotation with the angle
of self
multiplied by n
.
sourcepub fn scaled_axis(&self) -> VectorN<N, U1>
pub fn scaled_axis(&self) -> VectorN<N, U1>
The rotation angle returned as a 1-dimensional vector.
Trait Implementations§
source§impl<N1, N2> SubsetOf<Unit<Complex<N2>>> for Rotation2<N1>where
N1: Real,
N2: Real + SupersetOf<N1>,
impl<N1, N2> SubsetOf<Unit<Complex<N2>>> for Rotation2<N1>where
N1: Real,
N2: Real + SupersetOf<N1>,
source§fn to_superset(&self) -> UnitComplex<N2>
fn to_superset(&self) -> UnitComplex<N2>
The inclusion map: converts
self
to the equivalent element of its superset.source§fn is_in_subset(q: &UnitComplex<N2>) -> bool
fn is_in_subset(q: &UnitComplex<N2>) -> bool
Checks if
element
is actually part of the subset Self
(and can be converted to it).source§unsafe fn from_superset_unchecked(q: &UnitComplex<N2>) -> Self
unsafe fn from_superset_unchecked(q: &UnitComplex<N2>) -> Self
Use with care! Same as
self.to_superset
but without any property checks. Always succeeds.