specs_camera 0.3.6

camera 2d and 3d component for specs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct ScreenSize2D(pub usize, pub usize);

impl ScreenSize2D {
    #[inline(always)]
    pub fn new(w: usize, h: usize) -> ScreenSize2D {
        ScreenSize2D(w, h)
    }

    #[inline(always)]
    pub fn width(&self) -> usize {
        self.0
    }
    #[inline(always)]
    pub fn height(&self) -> usize {
        self.1
    }
}