1 2 3 4 5 6 7 8 9
use crate::geometry::TransformMatrix; pub trait Transform: Sized { #[must_use] fn transform(&self, matrix: &TransformMatrix) -> Self; fn transform_mut(&mut self, matrix: &TransformMatrix) { *self = self.transform(matrix); } }