An open source project by FPL.
MathFu is a C++ math library developed primarily for games focused on simplicity and efficiency.
It provides a suite of vector, matrix and quaternion classes to perform basic geometry suitable for game developers. This functionality can be used to construct geometry for graphics libraries like OpenGL or perform calculations for animation or physics systems.
Important: MathFu uses submodules to reference other components it depends upon so download the source using:
Each vector, matrix and quaternion class implements basic arithmetic operators (addition, subtraction, multiplication, division) in addition to simple linear algebra operators (e.g dot product, cross product, inverse, slerp).
MathFu is optimized using SIMD instructions (including NEON for ARM and SSE for x86 architectures). SIMD optimization is enabled by default based upon the target platform and compiler options used to build a project. In addition, MathFu provides compile time options to modify code generation, see Build Configurations for more details.
MathFu has been tested on the following platforms:
This library is entirely written in C++ with the exception of some conditionally enabled compiler intrinsics and some workarounds for different compiler quirks, which means that it should work with either no or little modification on any platform that has a C++ compiler.