`&self` → `self` on `Copy` types.
This commit is contained in:
parent
0312981a4f
commit
d659747fa4
|
@ -275,7 +275,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: RealField> DualQuaternion<T> {
|
impl<T: RealField> DualQuaternion<T> {
|
||||||
fn to_vector(&self) -> OVector<T, U8> {
|
fn to_vector(self) -> OVector<T, U8> {
|
||||||
(*self.as_ref()).into()
|
(*self.as_ref()).into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -724,7 +724,7 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_isometry(&self) -> Isometry3<T> {
|
pub fn to_isometry(self) -> Isometry3<T> {
|
||||||
Isometry3::from_parts(self.translation(), self.rotation())
|
Isometry3::from_parts(self.translation(), self.rotation())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -875,7 +875,7 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_homogeneous(&self) -> Matrix4<T> {
|
pub fn to_homogeneous(self) -> Matrix4<T> {
|
||||||
self.to_isometry().to_homogeneous()
|
self.to_isometry().to_homogeneous()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ impl<T: RealField> Orthographic3<T> {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_homogeneous(&self) -> Matrix4<T> {
|
pub fn to_homogeneous(self) -> Matrix4<T> {
|
||||||
self.matrix
|
self.matrix
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ impl<T: RealField> Orthographic3<T> {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_projective(&self) -> Projective3<T> {
|
pub fn to_projective(self) -> Projective3<T> {
|
||||||
Projective3::from_matrix_unchecked(self.matrix)
|
Projective3::from_matrix_unchecked(self.matrix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ impl<T: RealField> Perspective3<T> {
|
||||||
/// Computes the corresponding homogeneous matrix.
|
/// Computes the corresponding homogeneous matrix.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_homogeneous(&self) -> Matrix4<T> {
|
pub fn to_homogeneous(self) -> Matrix4<T> {
|
||||||
self.matrix.clone_owned()
|
self.matrix.clone_owned()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ impl<T: RealField> Perspective3<T> {
|
||||||
/// This transformation seen as a `Projective3`.
|
/// This transformation seen as a `Projective3`.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_projective(&self) -> Projective3<T> {
|
pub fn to_projective(self) -> Projective3<T> {
|
||||||
Projective3::from_matrix_unchecked(self.matrix)
|
Projective3::from_matrix_unchecked(self.matrix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1478,7 +1478,7 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_rotation_matrix(&self) -> Rotation<T, 3> {
|
pub fn to_rotation_matrix(self) -> Rotation<T, 3> {
|
||||||
let i = self.as_ref()[0];
|
let i = self.as_ref()[0];
|
||||||
let j = self.as_ref()[1];
|
let j = self.as_ref()[1];
|
||||||
let k = self.as_ref()[2];
|
let k = self.as_ref()[2];
|
||||||
|
@ -1513,7 +1513,7 @@ where
|
||||||
/// The angles are produced in the form (roll, pitch, yaw).
|
/// The angles are produced in the form (roll, pitch, yaw).
|
||||||
#[inline]
|
#[inline]
|
||||||
#[deprecated(note = "This is renamed to use `.euler_angles()`.")]
|
#[deprecated(note = "This is renamed to use `.euler_angles()`.")]
|
||||||
pub fn to_euler_angles(&self) -> (T, T, T)
|
pub fn to_euler_angles(self) -> (T, T, T)
|
||||||
where
|
where
|
||||||
T: RealField,
|
T: RealField,
|
||||||
{
|
{
|
||||||
|
@ -1561,7 +1561,7 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_homogeneous(&self) -> Matrix4<T> {
|
pub fn to_homogeneous(self) -> Matrix4<T> {
|
||||||
self.to_rotation_matrix().to_homogeneous()
|
self.to_rotation_matrix().to_homogeneous()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -883,7 +883,7 @@ impl<T: SimdRealField> Rotation3<T> {
|
||||||
///
|
///
|
||||||
/// The angles are produced in the form (roll, pitch, yaw).
|
/// The angles are produced in the form (roll, pitch, yaw).
|
||||||
#[deprecated(note = "This is renamed to use `.euler_angles()`.")]
|
#[deprecated(note = "This is renamed to use `.euler_angles()`.")]
|
||||||
pub fn to_euler_angles(&self) -> (T, T, T)
|
pub fn to_euler_angles(self) -> (T, T, T)
|
||||||
where
|
where
|
||||||
T: RealField,
|
T: RealField,
|
||||||
{
|
{
|
||||||
|
|
|
@ -261,7 +261,7 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_rotation_matrix(&self) -> Rotation2<T> {
|
pub fn to_rotation_matrix(self) -> Rotation2<T> {
|
||||||
let r = self.re;
|
let r = self.re;
|
||||||
let i = self.im;
|
let i = self.im;
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_homogeneous(&self) -> Matrix3<T> {
|
pub fn to_homogeneous(self) -> Matrix3<T> {
|
||||||
self.to_rotation_matrix().to_homogeneous()
|
self.to_rotation_matrix().to_homogeneous()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue