Macro mat::mat [] [src]

macro_rules! mat {
    ($ty:ty, [$([$($e:expr),*],)+]) => { ... };
}

Macro to construct a Matrix

Example

#[macro_use]
extern crate mat;

fn main() {
    let a = mat!(i32, [
        [1, 2],
        [3, 4],
    ]);

    assert_eq!(a[0][0], 1);
    assert_eq!(a[0][1], 2);
    assert_eq!(a[1][0], 3);
    assert_eq!(a[1][1], 4);
}