Added * operator and fixed Matrix.Set

This commit is contained in:
2024-12-24 14:25:14 +01:00
parent e4026b8d60
commit 3c596e9601
2 changed files with 15 additions and 6 deletions

View File

@@ -5,15 +5,16 @@ int main()
{
srand(time(0));
Matrix a(3,2);
Matrix a(3,3);
a.Randomize();
Matrix b = a;
Matrix b(3, 1);
b.Set(2.0F);
a.Print("A");
b.Print("B");
Matrix result = a - &b;
result.Print("A - B");
Matrix result = a * &b;
result.Print("A x B");
return 0;
}