diff --git a/src/structs/mat_macros.rs b/src/structs/mat_macros.rs index 53f919bd..f1c54571 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)] } }