extern crate num_traits;
use self::num_traits::Unsigned;
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Extent2<T: Unsigned> {
pub w: T,
pub h: T,
}
impl<T: Unsigned> From<(T,T)> for Extent2<T> {
fn from(pair: (T,T)) -> Self {
let (w, h) = pair;
Self { w, h }
}
}
impl<T: Unsigned> Extent2<T> {
pub fn new(w: T, h: T) -> Self {
Self::from((w, h))
}
}
pub type Rgba32 = u32;
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct Vec2<T> { pub x: T, pub y: T, }