1 2 3 4 5 6 7 8 9
use crate::V2; pub trait Translate: Sized { #[must_use] fn translate(&self, dist: V2) -> Self; fn translate_mut(&mut self, dist: V2) { *self = self.translate(dist); } }