[−][src]Struct bestagon::coords::Cube
Trait Implementations
impl Clone for Cube
[src]
impl Copy for Cube
[src]
impl Debug for Cube
[src]
impl Distance for Cube
[src]
fn dist(&self, other: &Cube) -> u8
[src]
use bestagon::{coords::Cube, distance::Distance}; assert_eq!(Cube(0, 4, -4).dist(&Cube(1, 2, -3)), 2); assert_eq!(Cube(-3, 2, 1).dist(&Cube(3, -1, -2)), 6); assert_eq!(Cube(-4, 4, 0).dist(&Cube(4, -4, 0)), 8);
impl Eq for Cube
[src]
impl Hash for Cube
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Into<Axial> for Cube
[src]
impl Into<Cube> for Axial
[src]
impl LinearInterpolation for Cube
[src]
fn lerp(&self, to: &Cube, t: f32) -> Cube
[src]
use bestagon::{coords::Cube, lerp::LinearInterpolation}; assert_eq!(Cube(0, 0, 0).lerp(&Cube(5, -4, -1), 0.00), Cube(0, 0, 0)); assert_eq!(Cube(0, 0, 0).lerp(&Cube(5, -4, -1), 0.25), Cube(1, -1, 0)); assert_eq!(Cube(0, 0, 0).lerp(&Cube(5, -4, -1), 0.49), Cube(2, -2, 0)); assert_eq!(Cube(0, 0, 0).lerp(&Cube(5, -4, -1), 0.51), Cube(3, -2, -1)); assert_eq!(Cube(0, 0, 0).lerp(&Cube(5, -4, -1), 0.75), Cube(4, -3, -1)); assert_eq!(Cube(0, 0, 0).lerp(&Cube(5, -4, -1), 1.00), Cube(5, -4, -1));
impl Neighbour for Cube
[src]
fn get_neighbour(&self, n: u8) -> Option<Cube>
[src]
impl PartialEq<Cube> for Cube
[src]
impl Range for Cube
[src]
impl StructuralEq for Cube
[src]
impl StructuralPartialEq for Cube
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cube
impl Send for Cube
impl Sync for Cube
impl Unpin for Cube
impl UnwindSafe for Cube
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> GridLine for T where
T: LinearInterpolation + Distance,
[src]
T: LinearInterpolation + Distance,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<C> Neighbours for C where
C: Neighbour,
[src]
C: Neighbour,
pub fn neighbours(&Self) -> NeighbourIterator<'_, C>ⓘNotable traits for NeighbourIterator<'a, C>
impl<'a, C> Iterator for NeighbourIterator<'a, C> where
C: Neighbour, type Item = C;
[src]
Notable traits for NeighbourIterator<'a, C>
impl<'a, C> Iterator for NeighbourIterator<'a, C> where
C: Neighbour, type Item = C;
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,