An example with 3x3 matrix

main
Micke Nordin 2 years ago
parent 8e5bc40d6d
commit c558dacb46
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -3,17 +3,25 @@
#include "../vectors/vector.hpp" #include "../vectors/vector.hpp"
int main() { int main() {
vector v = vector(2); vector a = vector(3);
v[0] = cnumber(1, 0); a[0] = cnumber(1, 0);
v[1] = cnumber(0, 1); a[1] = cnumber(0, 0);
a[2] = cnumber(0, 0);
vector w = vector(2); vector b = vector(3);
w[0] = cnumber(1, 0); b[0] = cnumber(0, 0);
w[1] = cnumber(0, -1); b[1] = cnumber(1, 0);
b[2] = cnumber(0, 0);
matrix m = matrix(2, 2); vector c = vector(3);
m[0] = v; c[0] = cnumber(0, 0);
m[1] = w; c[1] = cnumber(0, 0);
c[2] = cnumber(0, -1);
matrix m = matrix(3, 3);
m[0] = a;
m[1] = b;
m[2] = c;
cout << m << endl; cout << m << endl;
return 0; return 0;

BIN
test

Binary file not shown.
Loading…
Cancel
Save