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