Skip to main content

Region2

Type Alias Region2 

Source
pub type Region2<P, E> = Region<P, E, 2>;
Expand description

📐 A 2-dimensional Region.


📍 geom/metric


Aliased Type§

pub struct Region2<P, E> {
    pub pos: Position<P, 2>,
    pub ext: Extent<E, 2>,
}

Fields§

§pos: Position<P, 2>
§ext: Extent<E, 2>

Implementations§

Source§

impl<P: Copy, E: Copy> Region2<P, E>

Source

pub const fn x(self) -> P

Returns a copy of the first position dimension x.

Source

pub const fn y(self) -> P

Returns a copy of the second position dimension y.

Source

pub const fn w(self) -> E

Returns a copy of the first extent dimension width.

Source

pub const fn h(self) -> E

Returns a copy of the second extent dimension height.