diff --git a/src/structs/mat_macros.rs b/src/structs/mat_macros.rs index d128b998..4c86a9f0 100644 --- a/src/structs/mat_macros.rs +++ b/src/structs/mat_macros.rs @@ -682,8 +682,8 @@ macro_rules! from_homogeneous_impl( fn from(m: &$t2) -> $t { let mut res: $t = ::one(); - for i in 0..$dim2 { - for j in 0..$dim2 { + for i in 0..$dim { + for j in 0..$dim { res[(i, j)] = m[(i, j)] } }