linearalgebra 0.2.1

Test project to learn Rust and implement a small library for linear algebra
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub trait One {
    fn one() -> Self;
}

macro_rules! impl_One {
    (for $($t:ty),+) => {
        $(impl One for $t {
            fn one() -> $t {
                1 as $t
            }
        })*
    }
}

impl_One!(for u8, u16, u32, u64, u128, usize);
impl_One!(for i8, i16, i32, i64, i128, isize);
impl_One!(for f32, f64);