# Mathematical Support

There are two modules (magnum::math and magnum::geometry) in Magnum providing some functionality for mathematic and geometric problems. They include (but are not limited to) the following important routines:

**Vector and Matrix Support**. A complete package for n-dimensional vectors and matrices forms the base of many geometric algorithms and the 3d graphics module. The algebra module is completely implemented as templates enabling usage of different base types (floats, doubles or even fixed point values).**Solver for Linear Systems**. Another important part of the mathematics module is the n-dimensional linear solver for inverting matrices and solving linear systems.**Quaternions**. For an easy-to-use and efficient representation of rotattions, a quaternion class is also included. Unlike Euler angles quaternions do not suffer from common instability problems and are much better suited for interpolations.**Interpolators**. For interpolating 1d, 2d and 3d data sets, a set of interpolator classes is included offering linear and quadratic interpolation.**Bodies**. The geometry package contains many common bodies, like cubes, spheres, aligned and oriented boxes. All these classes are again implemented as templates for a maximum of flexibility.**Intersection Tests**. Most bodies support intersection tests with other bodies, and linear components (lines, rays and segments) and containment tests for single points.**Triangle Mesh**. The geometry module also contains a triangle mesh class for intersection testing.