B MATH REFERENCE

Appendix B includes mathematical concepts and code examples that didn't quite fit within earlier sections of the book, but nonetheless could be useful and hopefully interesting for creative coding.

Algebra

We use the term literate to describe a person fluent in the use of a natural language. The term numerate describes a similar fluency with math, and algebra is first and foremost at the core of that fluency. Programming and algebra have a close relationship, as they both utilize expressions composed of symbols. Following are some handy rules and procedures fundamental to algebra and programming.

Adding negative numbers

Adding two negatives results in a larger negative:

−3+(−6)=−9

Here's another (simpler) way to write the previous ...

Get Processing Creative Coding and Computational Art 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.