pub type Pos = Pos<u16>;Expand description
Pos in the grid, in (x = column, y = row) order.
Implements Ord in row-major order (y primary, then x), which is the
natural ordering for terminal rendering: top-to-bottom, left-to-right within
each row.
§Examples
use retroglyph_core::grid::Pos;
let pos = Pos::new(2, 1);
assert_eq!(pos.x, 2);
assert_eq!(pos.y, 1);This crate’s serde feature forwards to [ixy]’s own serde feature, so Pos gains
Serialize/Deserialize from its upstream definition rather than one defined here.
Aliased Type§
#[repr(C)]pub struct Pos {
pub x: u16,
pub y: u16,
}Fields§
§x: u16The x-coordinate, or horizontal position from the origin.
(x increases →)
+---------→ x
|
|
↓
yy: u16The y-coordinate, or vertical position from the origin.
(y increases ↓)
+---------→ x
|
|
↓
y