pub trait IsBuildable2D:
Sized
+ Is2D
+ IsBuildableND
+ Eq
+ PartialEq
+ Ord
+ PartialOrd
+ Hash {
// Required methods
fn new(x: f64, y: f64) -> Self;
fn from<P>(&mut self, other: &P)
where P: Is2D;
// Provided methods
fn new_from<P>(other: &P) -> Self
where P: Is2D { ... }
fn normalized(&self) -> Result<Self> { ... }
fn zero() -> Self { ... }
fn multiply_m(&self, m: &Matrix3) -> Self { ... }
fn parse(text: &str) -> Result<Self> { ... }
fn center<P>(&self, other: &P) -> Self
where P: Is2D { ... }
}
Expand description
IsBuildable2D is a trait used for types which are positioned in 2D space and can be constructed
Required Methods§
Provided Methods§
Sourcefn normalized(&self) -> Result<Self>
fn normalized(&self) -> Result<Self>
Returns this with normalized values
Sourcefn multiply_m(&self, m: &Matrix3) -> Self
fn multiply_m(&self, m: &Matrix3) -> Self
Applies a matrix to this
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.