use number_traits::Float;
use mat32;

use specs::{VecStorage, Component};


pub struct Transform2D<T: 'static + Sync + Send + Copy + Float>(pub [T; 6]);


impl<T: 'static + Sync + Send + Copy + Float> Component for Transform2D<T> {
    type Storage = VecStorage<Self>;
}


impl<T: 'static + Sync + Send + Copy + Float> Default for Transform2D<T> {

    #[inline(always)]
    fn default() -> Self {
        Transform2D(mat32::new_identity())
    }
}


impl<T: 'static + Sync + Send + Copy + Float> Transform2D<T> {

    #[inline(always)]
    pub fn new() -> Self {
        Transform2D(mat32::new_identity())
    }
}
