pub trait Vector2D<T: FloatIsh>:
Default
+ Copy
+ Clone
+ PartialEq
+ PartialOrd {
// Required methods
fn vx(&self) -> T;
fn vy(&self) -> T;
fn magnitude(&self) -> T;
fn normalize(&self) -> Self;
fn dot(&self, other: &Self) -> T;
fn angle(&self, other: &Self) -> Angle;
fn perpendicular(&self) -> Self;
fn rotate(&self, angle: Angle) -> Self;
fn abs(&self) -> Self;
fn to_point(&self) -> Point<T>;
}Required Methods§
fn vx(&self) -> T
fn vy(&self) -> T
fn magnitude(&self) -> T
fn normalize(&self) -> Self
fn dot(&self, other: &Self) -> T
fn angle(&self, other: &Self) -> Angle
fn perpendicular(&self) -> Self
fn rotate(&self, angle: Angle) -> Self
fn abs(&self) -> Self
fn to_point(&self) -> Point<T>
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.