Type Alias GridPoint

Source
pub type GridPoint<C> = Point2d<GridIndex<C>>;
Expand description

The x and y positions of a chunk in the number of chunks, not in world coordinates.

Aliased Type§

pub struct GridPoint<C> {
    pub x: GridIndex<C>,
    pub y: GridIndex<C>,
}

Fields§

§x: GridIndex<C>

x position

§y: GridIndex<C>

y position

Implementations§

Source§

impl<C: Chunk> GridPoint<C>

Source

pub fn into_same_chunk_size<D: Chunk>(self) -> GridPoint<D>

When two Chunks have the same size, all their coordinates are trivially the same and we can convert them with just a compile-time check.