Enum hex_coordinates::OffsetSystem
source · [−]pub enum OffsetSystem {
OddR,
EvenR,
OddQ,
EvenQ,
}
Expand description
Offset coordinate variants.
Variants
OddR
╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲
|0,0|1,0|2,0|3,0|4,0|5,0|6,0|
╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱
│0,1│1,1│2,1│3,1│4,1│5,1│6,1│
╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲
|0,2|1,2|2,2|3,2|4,2|5,2|6,2|
╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱
│0,3│1,3│2,3│3,3│4,3│5,3│6,3│
╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲
|0,4|1,4|2,4|3,4|4,4|5,4|6,4|
╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱
EvenR
╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲
│0,0│1,0│2,0│3,0│4,0│5,0│6,0│
╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲
|0,1|1,1|2,1|3,1|4,1|5,1|6,1|
╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱
│0,2│1,2│2,2│3,2│4,2│5,2│6,2│
╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲
|0,3|1,3|2,3|3,3|4,3|5,3|6,3|
╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱
│0,4│1,4│2,4│3,4│4,4│5,4│6,4│
╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱
OddQ
___ ___ ___ ___
╱0,0╲___╱2,0╲___╱4,0╲___╱6,0╲___
╲___╱1,0╲___╱3,0╲___╱5,0╲___╱7,0╲
╱0,1╲___╱2,1╲___╱4,1╲___╱6,1╲___╱
╲___╱1,1╲___╱3,1╲___╱5,1╲___╱7,1╲
╱0,2╲___╱2,2╲___╱4,2╲___╱6,2╲___╱
╲___╱1,2╲___╱3,2╲___╱5,2╲___╱7,2╲
╱0,3╲___╱2,3╲___╱4,3╲___╱6,3╲___╱
╲___╱1,3╲___╱3,3╲___╱5,3╲___╱7,3╲
╱0,4╲___╱2,4╲___╱4,4╲___╱6,4╲___╱
╲___╱1,4╲___╱3,4╲___╱5,4╲___╱7,4╲
╲___╱ ╲___╱ ╲___╱ ╲___╱
EvenQ
___ ___ ___ ___
___╱1,0╲___╱3,0╲___╱5,0╲___╱7,0╲
╱0,0╲___╱2,0╲___╱4,0╲___╱6,0╲___╱
╲___╱1,1╲___╱3,1╲___╱5,1╲___╱7,1╲
╱0,1╲___╱2,1╲___╱4,1╲___╱6,1╲___╱
╲___╱1,2╲___╱3,2╲___╱5,2╲___╱7,2╲
╱0,2╲___╱2,2╲___╱4,2╲___╱6,2╲___╱
╲___╱1,3╲___╱3,3╲___╱5,3╲___╱7,3╲
╱0,3╲___╱2,3╲___╱4,3╲___╱6,3╲___╱
╲___╱1,4╲___╱3,4╲___╱5,4╲___╱7,4╲
╱0,4╲___╱2,4╲___╱4,4╲___╱6,4╲___╱
╲___╱ ╲___╱ ╲___╱ ╲___╱
Trait Implementations
sourceimpl Clone for OffsetSystem
impl Clone for OffsetSystem
sourcefn clone(&self) -> OffsetSystem
fn clone(&self) -> OffsetSystem
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OffsetSystem
impl Debug for OffsetSystem
sourceimpl PartialEq<OffsetSystem> for OffsetSystem
impl PartialEq<OffsetSystem> for OffsetSystem
sourcefn eq(&self, other: &OffsetSystem) -> bool
fn eq(&self, other: &OffsetSystem) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Copy for OffsetSystem
impl Eq for OffsetSystem
impl StructuralEq for OffsetSystem
impl StructuralPartialEq for OffsetSystem
Auto Trait Implementations
impl RefUnwindSafe for OffsetSystem
impl Send for OffsetSystem
impl Sync for OffsetSystem
impl Unpin for OffsetSystem
impl UnwindSafe for OffsetSystem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more