Expand description
A library for creating, using, and printing matrices.
Matrices can be defined using the public struct, mtrs::Matrix
, or the macro matrix!
.
Currently the Matrix
struct does not internally support floats. This may change in the future.
#[macro_use] extern crate mtrs;
use mtrs::Matrix;
fn main() {
let matrix = matrix![f32; (2, 2); 1, 2; 3, 4.1];
println!("{}", matrix.scalar_add(4.1));
}
The Matrix
struct supports addition, subtraction, and multiplication with eachother,
along with implementations for basic operations between a scalar value and a Matrix
Macros§
- matrix
- A macro that can be used to define new matrices like so:
Structs§
- Matrix
- The main Matrix struct. Can be created in a variety of different ways.