elsuizo / static-math

Safe and fast mathematical operations with static arrays in the Rust programming language
40 stars 2 forks source link

implement `SubAssign` and `AddAssign` for the matrices #8

Closed elsuizo closed 4 years ago

elsuizo commented 4 years ago

with that you could do:

let I: M22<f64> = M22::identity();
let mut m = m22_new!(1.0, 2.0; 3.0, 4.0);
m += I;
m -= I;