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.


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 ...

Get Cardboard VR Projects for Android now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.