use num::{Zero, One}; use alga::general::{ClosedAdd, ClosedMul}; use core::{SquareMatrix, Scalar}; use core::dimension::DimName; use core::storage::OwnedStorage; use core::allocator::OwnedAllocator; use geometry::RotationBase; impl RotationBase where N: Scalar + Zero + One, S: OwnedStorage, S::Alloc: OwnedAllocator { /// Creates a new square identity rotation of the given `dimension`. #[inline] pub fn identity() -> RotationBase { Self::from_matrix_unchecked(SquareMatrix::::identity()) } } impl One for RotationBase where N: Scalar + Zero + One + ClosedAdd + ClosedMul, S: OwnedStorage, S::Alloc: OwnedAllocator { #[inline] fn one() -> Self { Self::identity() } }