pub trait IsNormalized2D: Sized + Is2D {
// Required method
fn new<P>(p: P) -> Result<Self>
where P: Is2D;
// Provided methods
fn norm_x() -> Self { ... }
fn norm_y() -> Self { ... }
fn norm_x_neg() -> Self { ... }
fn norm_y_neg() -> Self { ... }
}
Expand description
IsNormalized2D is a trait used for types which are positioned within the 2D space and normalized
Required Methods§
Provided Methods§
Sourcefn norm_x() -> Self
fn norm_x() -> Self
Returns a new normalized object which only points in the positive x-Direction
Sourcefn norm_y() -> Self
fn norm_y() -> Self
Returns a new normalized object which only points in the positive y-Direction
Sourcefn norm_x_neg() -> Self
fn norm_x_neg() -> Self
Returns a new normalized object which only points in the negative x-Direction
Sourcefn norm_y_neg() -> Self
fn norm_y_neg() -> Self
Returns a new normalized object which only points in the negative y-Direction
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.