diff --git a/src/adaptors/transform.rs b/src/adaptors/transform.rs index da3422bc..073f2728 100644 --- a/src/adaptors/transform.rs +++ b/src/adaptors/transform.rs @@ -279,9 +279,9 @@ ToHomogeneous for Transform impl + Dim, M2: FromHomogeneous, V> FromHomogeneous for Transform { - fn from_homogeneous(m: &M) -> Transform + fn from(m: &M) -> Transform { - Transform::new(FromHomogeneous::from_homogeneous(m), + Transform::new(FromHomogeneous::from(m), m.column(Dim::dim::() - 1)) } } diff --git a/src/mat_macros.rs b/src/mat_macros.rs index ed15c500..54b40b10 100644 --- a/src/mat_macros.rs +++ b/src/mat_macros.rs @@ -399,7 +399,7 @@ macro_rules! from_homogeneous_impl( ($t: ident, $t2: ident, $dim: expr, $dim2: expr) => ( impl FromHomogeneous<$t2> for $t { - fn from_homogeneous(m: &$t2) -> $t + fn from(m: &$t2) -> $t { let mut res: $t = One::one(); diff --git a/src/vec_macros.rs b/src/vec_macros.rs index 5c2c0a2d..ad099cb4 100644 --- a/src/vec_macros.rs +++ b/src/vec_macros.rs @@ -412,7 +412,7 @@ macro_rules! from_homogeneous_impl( ($t: ident, $t2: ident, $extra: ident, $comp0: ident $(,$compN: ident)*) => ( impl + One + Zero> FromHomogeneous<$t2> for $t { - fn from_homogeneous(v: &$t2) -> $t + fn from(v: &$t2) -> $t { let mut res: $t = Zero::zero();