Struct dsalgo::geometric_vector_2d_i64::Vector2D
source · pub struct Vector2D(_, _);
Implementations§
source§impl Vector2D
impl Vector2D
sourcepub fn direction_type_of(&self, x: &Self) -> DirectionType
pub fn direction_type_of(&self, x: &Self) -> DirectionType
approximated direction from self
pub fn direction_type_from(&self, base: &Self) -> DirectionType
Trait Implementations§
source§impl AddAssign<Vector2D> for Vector2D
impl AddAssign<Vector2D> for Vector2D
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl DivAssign<i64> for Vector2D
impl DivAssign<i64> for Vector2D
source§fn div_assign(&mut self, x: i64)
fn div_assign(&mut self, x: i64)
Performs the
/=
operation. Read moresource§impl MulAssign<i64> for Vector2D
impl MulAssign<i64> for Vector2D
source§fn mul_assign(&mut self, x: i64)
fn mul_assign(&mut self, x: i64)
Performs the
*=
operation. Read moresource§impl Ord for Vector2D
impl Ord for Vector2D
source§impl PartialEq<Vector2D> for Vector2D
impl PartialEq<Vector2D> for Vector2D
source§impl PartialOrd<Vector2D> for Vector2D
impl PartialOrd<Vector2D> for Vector2D
compare by angle
source§fn le(&self, other: &Self) -> bool
fn le(&self, other: &Self) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§fn ge(&self, other: &Self) -> bool
fn ge(&self, other: &Self) -> bool
This method tests greater than or equal to (for
self
and other
) and is used by the >=
operator. Read moresource§impl SubAssign<Vector2D> for Vector2D
impl SubAssign<Vector2D> for Vector2D
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read more