diff --git a/src/base/matrix.rs b/src/base/matrix.rs index 172e293f..38f7241f 100644 --- a/src/base/matrix.rs +++ b/src/base/matrix.rs @@ -832,14 +832,7 @@ impl, S: Storage> Vector { #[inline] pub fn to_homogeneous(&self) -> VectorN> where DefaultAllocator: Allocator> { - let len = self.len(); - let hnrows = DimSum::::from_usize(len + 1); - let mut res = unsafe { VectorN::::new_uninitialized_generic(hnrows, U1) }; - res.generic_slice_mut((0, 0), self.data.shape()) - .copy_from(self); - res[(len, 0)] = N::zero(); - - res + self.push(N::zero()) } /// Constructs a vector from coordinates in projective space, i.e., removes a `0` at the end of