Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I dont know how long you have been programming, but since when do indices start with 1? I personally dont know any language that does that. So of course your matx33 object start with (0,0) and ends with (2,2).

Matx33f woah;
woah(0,0) = 0.0;
woah(0,1) = 0.0;
woah(0,2) = 0.0;
woah(1,0) = 0.0;
woah(1,1) = 0.0;
woah(1,2) = 0.0;
woah(2,0) = 0.0;
woah(2,1) = 10.0;
woah(2,2) = 10.0;

cout << woah << endl;

I dont know how long you have been programming, but since when do indices start with 1? I personally dont know any language that does that. So of course your matx33 object start starts with (0,0) and ends with (2,2).

Matx33f woah;
woah(0,0) = 0.0;
woah(0,1) = 0.0;
woah(0,2) = 0.0;
woah(1,0) = 0.0;
woah(1,1) = 0.0;
woah(1,2) = 0.0;
woah(2,0) = 0.0;
woah(2,1) = 10.0;
woah(2,2) = 10.0;

cout << woah << endl;

I dont know how long you have been programming, but since when do indices start with 1? I personally dont know any language that does that. So of course your matx33 object starts with (0,0) and ends with (2,2).

Matx33f woah;
woah(0,0) = 0.0;
woah(0,1) = 0.0;
woah(0,2) = 0.0;
woah(1,0) = 0.0;
woah(1,1) = 0.0;
woah(1,2) = 0.0;
woah(2,0) = 0.0;
woah(2,1) = 10.0;
woah(2,2) = 10.0;

cout << woah << endl;

Edit: Btw, one interesting thing to know. Only the Mat object has a range check as far as I know. If you use Matx or Mat_< type > you wont notice if you accidently access some random memory region.

I dont know how long you have been programming, but since when do indices start with 1? I personally dont know any modern language that does that. So of course your matx33 object starts with (0,0) and ends with (2,2).

Matx33f woah;
woah(0,0) = 0.0;
woah(0,1) = 0.0;
woah(0,2) = 0.0;
woah(1,0) = 0.0;
woah(1,1) = 0.0;
woah(1,2) = 0.0;
woah(2,0) = 0.0;
woah(2,1) = 10.0;
woah(2,2) = 10.0;

cout << woah << endl;

Edit: Btw, one interesting thing to know. Only the Mat object has a range check as far as I know. If you use Matx or Mat_< type > you wont notice if you accidently access some random memory region.