#
The TikZ and PGF Packages

Manual for version 3.1.10

## Part VIII Mathematical and Object-Oriented Engines

**Sections**

*by Mark Wibrow and Till Tantau*

pgf comes with two useful engines: One for doing mathematics, one for doing object-oriented programming. Both engines can be used independently of the main pgf.

The job of the mathematical engine is to support mathematical operations like addition, subtraction, multiplication and division, using both integers and non-integers, but also functions such as square-roots, sine, cosine, and generate pseudo-random numbers. Mostly, you will use the mathematical facilities of pgf indirectly, namely when you write a coordinate like (5cm*3,6cm/4), but the mathematical engine can also be used independently of pgf and TikZ.

The job of the object-oriented engine is to support simple object-oriented programming in
TeX. It allows the definition of *classes* (without inheritance), *methods*, *attributes* and
*objects*.