Equal Matrices
Matrices can be used to organize a set of numbers in rows and columns in your game. You might be familiar with the term array, which is a grid-like system for organizing any type of information (numbers, variables, text, even arrays). A matrix is just an array that is limited to storing numbers. We discussed an example of a matrix in the preceding chapter. In some places we used a single-row matrix to represent a vector. A matrix can have as many rows or columns as you need. We used a single row for one vector. You could also use a matrix with many rows to store all the vertices of an object in your game. In that case, each row would represent an individual point. You, as the programmer, can give any meaning you like to each row ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access