[][src]Struct beehive::VectorAxial

#[repr(C)]pub struct VectorAxial<T> {
    pub x: T,
    pub y: T,
    pub w: T,
}

Axial hex coordinates representing vectors. Always valid.

Fields

x: Ty: Tw: T

Methods

impl<T> VectorAxial<T>[src]

pub fn new(x: T, y: T, w: T) -> Self[src]

impl<T: Zero> VectorAxial<T>[src]

pub fn zero() -> Self[src]

impl<T: One> VectorAxial<T>[src]

pub fn one() -> Self[src]

impl<T: Copy + Zero + Sub<Output = T>> VectorAxial<T>[src]

pub fn to_cube(self) -> Vector<T>[src]

impl<T: Real> VectorAxial<T>[src]

pub fn round(self) -> Self[src]

impl<T> VectorAxial<T>[src]

pub fn cast<N>(self) -> VectorAxial<N> where
    N: 'static + Copy,
    T: AsPrimitive<N>, 
[src]

Cast to a primitive type.

N must be a primitive numeric type.

impl<T> VectorAxial<T>[src]

pub fn into_point(self) -> PointAxial<T>[src]

Convert this vector to a point with the same component values.

impl<T: Zero + One + Neg<Output = T>> VectorAxial<T>[src]

pub fn in_direction(d: Direction) -> VectorAxial<T>[src]

Get directional vector from a Direction value.

Trait Implementations

impl<T> Add<Direction> for VectorAxial<T> where
    T: Zero + One + Add + Neg<Output = T>, 
[src]

type Output = VectorAxial<T>

The resulting type after applying the + operator.

impl<T, O> Add<VectorAxial<T>> for PointAxial<T> where
    T: Add<Output = O>, 
[src]

type Output = PointAxial<O>

The resulting type after applying the + operator.

impl<T, O> Add<VectorAxial<T>> for VectorAxial<T> where
    T: Add<Output = O>, 
[src]

type Output = VectorAxial<O>

The resulting type after applying the + operator.

impl<T> AddAssign<Direction> for VectorAxial<T> where
    T: Zero + One + AddAssign<T> + Neg<Output = T>, 
[src]

impl<T> AddAssign<VectorAxial<T>> for PointAxial<T> where
    T: AddAssign
[src]

impl<T> AddAssign<VectorAxial<T>> for VectorAxial<T> where
    T: AddAssign
[src]

impl<T: Clone> Clone for VectorAxial<T>[src]

impl<T: Copy> Copy for VectorAxial<T>[src]

impl<T: Debug> Debug for VectorAxial<T>[src]

impl<T: Default> Default for VectorAxial<T>[src]

impl<'de, T> Deserialize<'de> for VectorAxial<T> where
    T: Deserialize<'de>, 
[src]

impl<T: Display> Display for VectorAxial<T>[src]

impl<T, O> Div<T> for VectorAxial<T> where
    T: Copy + Div<Output = O>, 
[src]

type Output = VectorAxial<O>

The resulting type after applying the / operator.

impl<T> DivAssign<T> for VectorAxial<T> where
    T: Copy + DivAssign
[src]

impl<T: Eq> Eq for VectorAxial<T>[src]

impl<T> From<Vector<T>> for VectorAxial<T>[src]

impl<T: Copy + Zero + Sub<Output = T>> From<VectorAxial<T>> for Vector<T>[src]

impl<T: Hash> Hash for VectorAxial<T>[src]

impl<T, O> Mul<T> for VectorAxial<T> where
    T: Copy + Mul<Output = O>, 
[src]

type Output = VectorAxial<O>

The resulting type after applying the * operator.

impl<T> MulAssign<T> for VectorAxial<T> where
    T: Copy + MulAssign
[src]

impl<T: PartialEq> PartialEq<VectorAxial<T>> for VectorAxial<T>[src]

impl<T> Serialize for VectorAxial<T> where
    T: Serialize
[src]

impl<T> StructuralEq for VectorAxial<T>[src]

impl<T> StructuralPartialEq for VectorAxial<T>[src]

impl<T> Sub<Direction> for VectorAxial<T> where
    T: Zero + One + Sub<Output = T> + Neg<Output = T>, 
[src]

type Output = VectorAxial<T>

The resulting type after applying the - operator.

impl<T, O> Sub<VectorAxial<T>> for PointAxial<T> where
    T: Sub<Output = O>, 
[src]

type Output = PointAxial<O>

The resulting type after applying the - operator.

impl<T, O> Sub<VectorAxial<T>> for VectorAxial<T> where
    T: Sub<Output = O>, 
[src]

type Output = VectorAxial<O>

The resulting type after applying the - operator.

impl<T> SubAssign<Direction> for VectorAxial<T> where
    T: Zero + One + SubAssign<T> + Neg<Output = T>, 
[src]

impl<T> SubAssign<VectorAxial<T>> for PointAxial<T> where
    T: SubAssign
[src]

impl<T> SubAssign<VectorAxial<T>> for VectorAxial<T> where
    T: SubAssign
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for VectorAxial<T> where
    T: RefUnwindSafe

impl<T> Send for VectorAxial<T> where
    T: Send

impl<T> Sync for VectorAxial<T> where
    T: Sync

impl<T> Unpin for VectorAxial<T> where
    T: Unpin

impl<T> UnwindSafe for VectorAxial<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.