use num::One; use alga::general::Real; use base::{DefaultAllocator, MatrixN}; use base::dimension::{DimNameAdd, DimNameSum, U1}; use base::allocator::Allocator; use geometry::{TCategory, Transform}; impl, C: TCategory> Transform where DefaultAllocator: Allocator, DimNameSum>, { /// Creates a new identity transform. #[inline] pub fn identity() -> Self { Self::from_matrix_unchecked(MatrixN::<_, DimNameSum>::identity()) } } impl, C: TCategory> One for Transform where DefaultAllocator: Allocator, DimNameSum>, { /// Creates a new identity transform. #[inline] fn one() -> Self { Self::identity() } }