[−][src]Struct bestagon::coords::Axial
Trait Implementations
impl Clone for Axial
[src]
impl Copy for Axial
[src]
impl Debug for Axial
[src]
impl Distance for Axial
[src]
fn dist(&self, other: &Axial) -> u8
[src]
use bestagon::{coords::Axial, distance::Distance}; assert_eq!(Axial(0, 4).dist(&Axial(1, 2)), 2); assert_eq!(Axial(-3, 2).dist(&Axial(3, -1)), 6);
impl Eq for Axial
[src]
impl Into<Axial> for Cube
[src]
impl Into<Cube> for Axial
[src]
impl LinearInterpolation for Axial
[src]
fn lerp(&self, to: &Axial, t: f32) -> Axial
[src]
use bestagon::{coords::Axial, lerp::LinearInterpolation}; assert_eq!(Axial(0, 0).lerp(&Axial(5, -4), 0.00), Axial(0, 0)); assert_eq!(Axial(0, 0).lerp(&Axial(5, -4), 0.25), Axial(1, -1)); assert_eq!(Axial(0, 0).lerp(&Axial(5, -4), 0.49), Axial(2, -2)); assert_eq!(Axial(0, 0).lerp(&Axial(5, -4), 0.51), Axial(3, -2)); assert_eq!(Axial(0, 0).lerp(&Axial(5, -4), 0.75), Axial(4, -3)); assert_eq!(Axial(0, 0).lerp(&Axial(5, -4), 1.00), Axial(5, -4));
impl Neighbour for Axial
[src]
fn get_neighbour(&self, n: u8) -> Option<Axial>
[src]
impl PartialEq<Axial> for Axial
[src]
impl StructuralEq for Axial
[src]
impl StructuralPartialEq for Axial
[src]
Auto Trait Implementations
impl RefUnwindSafe for Axial
impl Send for Axial
impl Sync for Axial
impl Unpin for Axial
impl UnwindSafe for Axial
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>,