gsa 0.2.1

Game development library modelled after an imaginary console
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// RGB Color
#[derive(Copy, Clone)]
pub struct Rgb {
    /// Red component 0-255
    pub r: u8,
    /// Green component 0-255
    pub g: u8,
    /// Blue component 0-255
    pub b: u8,
}

impl Rgb {
    pub(crate) fn to_u32(self) -> u32 {
        (self.r as u32) | ((self.g as u32) << 8) | ((self.b as u32) << 16)
    }
}