Skip to main content

hex_distance

Function hex_distance 

Source
pub fn hex_distance(a: Coord, b: Coord) -> i32
Expand description

Returns the hex distance between two axial coordinates. Calculated as max(|dq|, |dr|, |dq + dr|).