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 ...
Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.