[−][src]Trait rust_3d::Is2D
Is2D is a trait used for types which are positioned within the 2D space
Required methods
Loading content...Provided methods
fn xy(&self) -> [f64; 2]
Returns the Position as x,y array
fn dot(&self, other: &dyn Is2D) -> f64
Calculates the dot product with another Is2D
fn cross(&self, other: &dyn Is2D) -> f64
Calculates the cross product with another Is2D
fn abs(&self) -> NonNegative
The absolute / length of this position
fn rad_to(&self, other: &dyn Is2D) -> Rad
Calculates the angle to the other Is2D in radians
fn to_str(&self) -> String
Transforms the position in a "x y" string. E.g. "3.72 5.99"
Trait Implementations
impl<P> HasDistanceTo<P> for dyn Is2D where
P: Is2D,
[src]
P: Is2D,
fn sqr_distance(&self, other: &P) -> NonNegative
[src]
fn distance(&self, other: &T) -> NonNegative
[src]
Implementations on Foreign Types
impl<P> Is2D for Box<P> where
P: IsND + Is2D,
[src]
Loading content...
P: IsND + Is2D,