Hello, thanks for the book good materials in it. I just wanted to point that the matrix representation in a single array like you did was not obvious for new comers.
When i read it . the most obvious representation of matrix to me was array of arrays. and when i saw your representation i didn't understood why the need for the width in the index calculus. it is only after seeing it in an other code base (ReiNX splash screen) and some googling i understood it was something really simple as explained here :https://stackoverflow.com/questions/14015556/how-to-map-the-indexes-of-a-matrix-to-a-1-dimensional-array-c/14015582 and that it was called row major order. and the width was added to prevent x:2,y:1 to not point to the same element as x:1,y:2.
Hello, thanks for the book good materials in it. I just wanted to point that the matrix representation in a single array like you did was not obvious for new comers. When i read it . the most obvious representation of matrix to me was array of arrays. and when i saw your representation i didn't understood why the need for the width in the index calculus. it is only after seeing it in an other code base (ReiNX splash screen) and some googling i understood it was something really simple as explained here :https://stackoverflow.com/questions/14015556/how-to-map-the-indexes-of-a-matrix-to-a-1-dimensional-array-c/14015582 and that it was called row major order. and the width was added to prevent x:2,y:1 to not point to the same element as x:1,y:2.