minlin 0.5.0

Rust library with minimal linear algebra made to be as convinient as possible.
Documentation
pub trait Two {
    const TWO: Self;
}

#[macro_export]
macro_rules! impl_two {
    ($t:ident < $g:ident > $([$(<$a:ident $(, $p:tt)?>),*])?) => {
        impl<$g: $crate::Two + Copy> $crate::Two for $t<$g> {
            const TWO: Self = Self::same_components($g::TWO);
        }
    };
}

macro_rules! impl_base_two {
    ($($t:ident),* -> $v:expr) => {
        $(impl Two for $t {
            const TWO: Self = $v;
        })*
    };
}

impl_base_two!(u8, i8, u16, i16, u32, i32, u64, i64, usize, isize, u128, i128 -> 2);
impl_base_two!(f32, f64 -> 2.);