Struct pathfinder::Coordinate
source · Expand description
Holds a position used for Nodes and Groups.
Fields§
§x: i16
§y: i16
Implementations§
source§impl Coordinate
impl Coordinate
sourcepub fn diff(self, other: Coordinate) -> (i16, i16)
pub fn diff(self, other: Coordinate) -> (i16, i16)
Calculates the different in x and y of two Coordinates.
Trait Implementations§
source§impl Add<Coordinate> for Coordinate
impl Add<Coordinate> for Coordinate
§type Output = Coordinate
type Output = Coordinate
The resulting type after applying the
+
operator.source§fn add(self, other: Coordinate) -> Coordinate
fn add(self, other: Coordinate) -> Coordinate
Performs the
+
operation. Read moresource§impl Clone for Coordinate
impl Clone for Coordinate
source§fn clone(&self) -> Coordinate
fn clone(&self) -> Coordinate
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Coordinate
impl Debug for Coordinate
source§impl Default for Coordinate
impl Default for Coordinate
source§fn default() -> Coordinate
fn default() -> Coordinate
Returns the “default value” for a type. Read more
source§impl Ord for Coordinate
impl Ord for Coordinate
source§fn cmp(&self, other: &Coordinate) -> Ordering
fn cmp(&self, other: &Coordinate) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<Coordinate> for Coordinate
impl PartialEq<Coordinate> for Coordinate
source§fn eq(&self, other: &Coordinate) -> bool
fn eq(&self, other: &Coordinate) -> bool
source§impl PartialOrd<Coordinate> for Coordinate
impl PartialOrd<Coordinate> for Coordinate
source§fn partial_cmp(&self, other: &Coordinate) -> Option<Ordering>
fn partial_cmp(&self, other: &Coordinate) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more