Struct grid_search_maze::Coord [−]
Expand description
General purpose coordinate
Fields
x: i32
y: i32
Implementations
impl Coord
impl Coord
pub fn set_in_place(&mut self, axis: Axis, value: i32)
pub fn get_static<A>(self) -> i32 where
A: StaticAxis,
pub fn get_static_mut<A>(&mut self) -> &mut i32 where
A: StaticAxis,
pub fn with_static_axis<A, F>(self, f: F) -> Coord where
A: StaticAxis,
F: FnMut(i32) -> i32,
pub fn set_static<A>(self, value: i32) -> Coord where
A: StaticAxis,
pub fn set_static_in_place<A>(&mut self, value: i32) where
A: StaticAxis,
pub fn new_static_axis<A>(this_axis: i32, other_axis: i32) -> Coord where
A: StaticAxis,
pub fn set_x_in_place(&mut self, x: i32)
pub fn set_y_in_place(&mut self, y: i32)
pub fn checked_add(self, rhs: Coord) -> Option<Coord>
pub fn checked_sub(self, rhs: Coord) -> Option<Coord>
pub fn checked_mul(self, rhs: i32) -> Option<Coord>
pub fn checked_div(self, rhs: i32) -> Option<Coord>
pub const fn magnitude2(self) -> u32
pub const fn manhattan_magnitude(self) -> u32
pub const fn manhattan_distance(self, other: Coord) -> u32
pub const fn cardinal_left45(self) -> Coord
pub const fn cardinal_right45(self) -> Coord
pub const fn cardinal_left135(self) -> Coord
pub const fn cardinal_right135(self) -> Coord
pub fn pairwise_max(self, other: Coord) -> Coord
pub fn pairwise_min(self, other: Coord) -> Coord
Trait Implementations
pub fn add_assign(&mut self, rhs: T)
pub fn add_assign(&mut self, rhs: T)
Performs the +=
operation. Read more
pub fn div_assign(&mut self, rhs: T)
pub fn div_assign(&mut self, rhs: T)
Performs the /=
operation. Read more
pub fn mul_assign(&mut self, rhs: T)
pub fn mul_assign(&mut self, rhs: T)
Performs the *=
operation. Read more
impl PartialOrd<Coord> for Coord
impl PartialOrd<Coord> for Coord
pub fn partial_cmp(&self, other: &Coord) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Coord) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn sub_assign(&mut self, rhs: T)
pub fn sub_assign(&mut self, rhs: T)
Performs the -=
operation. Read more
impl StructuralEq for Coord
impl StructuralPartialEq for Coord
Auto Trait Implementations
impl RefUnwindSafe for Coord
impl UnwindSafe for Coord
Blanket Implementations
Mutably borrows from an owned value. Read more