pub struct MapEdges {
pub x: Ends,
pub y: Ends,
}Expand description
The sides of a view the map goes on past: there is more map to its left, to its right, above it or below it.
Fields§
§x: EndsAcross: more map left of the view (before), right of it
(after).
y: EndsDown: more map above the view (before), below it (after).
Implementations§
Source§impl MapEdges
impl MapEdges
Sourcepub fn of_view(origin: Pos, size: (i32, i32), map_size: (i32, i32)) -> Self
pub fn of_view(origin: Pos, size: (i32, i32), map_size: (i32, i32)) -> Self
The sides a view of size tiles from origin leaves map past, on
a map of map_size tiles (across × down) from (0, 0): left when
the view starts right of the map’s first column, right when it
ends before its last, and the same up and down. A map smaller than
the view (centred in it, from a negative origin) goes on past none.
Trait Implementations§
impl Copy for MapEdges
impl Eq for MapEdges
impl StructuralPartialEq for MapEdges
Auto Trait Implementations§
impl Freeze for MapEdges
impl RefUnwindSafe for MapEdges
impl Send for MapEdges
impl Sync for MapEdges
impl Unpin for MapEdges
impl UnsafeUnpin for MapEdges
impl UnwindSafe for MapEdges
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more