From a3e3971bcf5cc938db1fcae1e24e1c72f5a10038 Mon Sep 17 00:00:00 2001 From: hachem Date: Mon, 16 Sep 2024 21:22:44 +0200 Subject: refactor and fix bugs --- mu/src/main.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'mu/src/main.rs') diff --git a/mu/src/main.rs b/mu/src/main.rs index f328e4d..a254401 100644 --- a/mu/src/main.rs +++ b/mu/src/main.rs @@ -1 +1,15 @@ -fn main() {} +use libmu::*; + +fn main() { + #[rustfmt::skip] + let matrix = matrix![[1.0, 2.0, 3.0]; + [4.0, 5.0, 6.0]; + [7.0, 8.0, 9.0]]; + let vector = row_vector![1.0, 2.0, 3.0]; + + let result = vector.mul_matrix(&matrix).unwrap(); + + println!("Matrix: \n{}", matrix); + println!("Vector: \n{}", vector); + println!("Result: \n{}", result); +} -- cgit v1.3