pub struct Rotation<T> { /* private fields */ }
Expand description
An 2D rotation that is representable using an integer matrix.
Implementations§
Source§impl<T> Rotation<T>
impl<T> Rotation<T>
Sourcepub fn random_cardinal_with(rng: &mut impl Rng) -> Self
pub fn random_cardinal_with(rng: &mut impl Rng) -> Self
Randomly one of the four cardinal rotations with the given rng.
Sourcepub fn random_cardinal() -> Self
pub fn random_cardinal() -> Self
Randomly one of the four cardinal rotations with the thread-local rng.
Trait Implementations§
impl<T: Copy> Copy for Rotation<T>
impl<T: Eq> Eq for Rotation<T>
impl<T> StructuralPartialEq for Rotation<T>
Auto Trait Implementations§
impl<T> Freeze for Rotation<T>where
T: Freeze,
impl<T> RefUnwindSafe for Rotation<T>where
T: RefUnwindSafe,
impl<T> Send for Rotation<T>where
T: Send,
impl<T> Sync for Rotation<T>where
T: Sync,
impl<T> Unpin for Rotation<T>where
T: Unpin,
impl<T> UnwindSafe for Rotation<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more