trait CoordinateExtensions {
// Required methods
fn manhattan_distance(&self, other: &Self) -> u32;
fn turn_cost(&self, other: &Self, facing: &Facing) -> u32;
}
Expand description
Helper trait to add methods to the built-in (u8, u8)
Coordinate type
Required Methods§
fn manhattan_distance(&self, other: &Self) -> u32
fn turn_cost(&self, other: &Self, facing: &Facing) -> u32
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl CoordinateExtensions for (u8, u8)
impl CoordinateExtensions for (u8, u8)
source§fn manhattan_distance(&self, other: &Self) -> u32
fn manhattan_distance(&self, other: &Self) -> u32
Manhattan distance between two points