The Math package
In Chapter 3, Cardboard Box, we introduced 3D geometry and matrix math calculations. We will wrap these up into even more useful functions.
Much of this math code that we've put together is from existing open source projects (attributions are given in comments in the source code). After all, we might as well take advantage of the math geniuses who like this stuff and have open sourced excellent true and tested code. The code list is included with the file downloads for this book.
Note
The following list documents our math API. The actual code is included with the file downloads for this book and the GitHub repository.
Generally speaking, the mathematics falls within the subject of linear algebra, but most of it is specific to graphics programming and works within the constraints of fast floating point math on modern CPUs.
We encourage you to browse the source code included with the book, which you will obviously need access to in order to complete the project. Suffice it to say...