pub trait OrthoTransform: Sized {
// Required methods
fn x_flipped(self) -> Self;
fn rotated(self, amount: i8) -> Self;
// Provided methods
fn y_flipped(self) -> Self { ... }
fn transformed(self, amount: OrthoTransformation) -> Self { ... }
}Expand description
Trait for objects that can perform a 2D orthogonal transformation. In other words, they can be flipped along the x and y axis, and they can be rotated by multiples of 90 degrees.
Required Methods§
Provided Methods§
Sourcefn transformed(self, amount: OrthoTransformation) -> Self
fn transformed(self, amount: OrthoTransformation) -> Self
Transform the object by the given amount.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".