pub struct HexCell {
pub q: i64,
pub r: i64,
}Expand description
A hex cell key for the flat-top hexagonal grid.
We use axial coordinates (q, r) to identify each hexagon. Two i64
values give us exact, hash-friendly keys without floating-point
comparison issues.
Fields§
§q: i64Axial q-coordinate (column).
r: i64Axial r-coordinate (row).
Trait Implementations§
impl Copy for HexCell
impl Eq for HexCell
impl StructuralPartialEq for HexCell
Auto Trait Implementations§
impl Freeze for HexCell
impl RefUnwindSafe for HexCell
impl Send for HexCell
impl Sync for HexCell
impl Unpin for HexCell
impl UnsafeUnpin for HexCell
impl UnwindSafe for HexCell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more