RFC: Add comment in `Rotation::to_homogeneous()`

This commit is contained in:
Jochen Görtler 2018-11-20 09:22:01 +01:00 committed by Sébastien Crozet
parent bc9c74cbb6
commit 85bfae5390
1 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,9 @@ where DefaultAllocator: Allocator<N, D, D>
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<N, DimNameSum<D, U1>, DimNameSum<D, U1>>,
{
// We could use `MatrixN::to_homogeneous()` here, but that would imply
// adding the additional traits `DimAdd` and `IsNotStaticOne`. Maybe
// these things will get nicer once specialization lands in Rust.
let mut res = MatrixN::<N, DimNameSum<D, U1>>::identity();
res.fixed_slice_mut::<D, D>(0, 0).copy_from(&self.matrix);