Macro peroxide::eye

source ·
macro_rules! eye {
    ( $n:expr ) => { ... };
}
Expand description

MATLAB like eye - identity matrix

§Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let i = eye!(2);
    assert_eq!(i, matrix(c!(1,0,0,1), 2, 2, Row));
}