[][src]Struct hex_grid::coordinate::Coordinate

pub struct Coordinate {
    pub x: i32,
    pub y: i32,
}

Fields

x: i32y: i32

Methods

impl Coordinate[src]

pub fn z(&self) -> i32[src]

pub fn to_pixel(
    &self,
    hex_size: HexSize,
    pixel_orientation: PixelOrientation
) -> (f32, f32)
[src]

pub fn from_pixel(
    (px, py): (f32, f32),
    hex_size: HexSize,
    pixel_orientation: PixelOrientation
) -> Coordinate
[src]

Trait Implementations

impl From<(i32, i32)> for Coordinate[src]

impl Clone for Coordinate[src]

impl Copy for Coordinate[src]

impl Eq for Coordinate[src]

impl PartialEq<Coordinate> for Coordinate[src]

impl Debug for Coordinate[src]

impl<C: Into<Coordinate>> Sub<C> for Coordinate[src]

type Output = Offset

The resulting type after applying the - operator.

impl Add<Coordinate> for Offset[src]

type Output = Coordinate

The resulting type after applying the + operator.

impl<O: Into<Offset>> Add<O> for Coordinate[src]

type Output = Coordinate

The resulting type after applying the + operator.

impl Add<Vec<Offset>> for Coordinate[src]

type Output = Vec<Coordinate>

The resulting type after applying the + operator.

impl Add<Coordinate> for Vec<Offset>[src]

type Output = Vec<Coordinate>

The resulting type after applying the + operator.

impl Hash for Coordinate[src]

impl StructuralPartialEq for Coordinate[src]

impl StructuralEq for Coordinate[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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