bubbles/core/
dimension.rs

1#[derive(Clone, Copy)]
2pub struct Dimension {
3    pub x: u16,
4    pub y: u16,
5    pub width: usize,
6    pub height: usize,
7}
8
9impl Dimension {
10    pub fn new(x: u16, y: u16, width: usize, height: usize) -> Self {
11        Self {
12            x,
13            y,
14            width,
15            height,
16        }
17    }
18}
19
20impl Default for Dimension {
21    fn default() -> Self {
22        Self {
23            x: 0,
24            y: 0,
25            width: 0,
26            height: 0,
27        }
28    }
29}