aboutsummaryrefslogtreecommitdiff
path: root/mu/src/main.rs
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2024-09-16 21:22:44 +0200
committerhachem <im@hachem.wtf>2024-09-16 21:22:44 +0200
commita3e3971bcf5cc938db1fcae1e24e1c72f5a10038 (patch)
treedcc73c9514bdb69cccb76b53e8cff4cd53a35b8a /mu/src/main.rs
parent5abda23c3ed21db3c0a4541b85b6e2e916ce569e (diff)
refactor and fix bugs
Diffstat (limited to 'mu/src/main.rs')
-rw-r--r--mu/src/main.rs16
1 files changed, 15 insertions, 1 deletions
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);
+}