Description
The goal of this library is to provide the mathematical objects commonly used in games:
- all values have 32 bit floating point type unless otherwise noted
- vec2, vec3, vec4 (2,3 and 4 dimension vectors)
- mat4 (4x4 matrix)
- aabb2 (2D axis-aligned bounding box)
- aabb3 (3D axis-aligned bounding box)
- color (red, green, blue, alpha values)
- floatarray (array of floating point values)
The library is compiled to a 'sgsxgmath' shared library so it can be included this way (assuming that, on Linux and similar systems, LD_LIBRARY_PATH is set correctly):
include "sgsxgmath";
It is extremely important that only one instance of this library is loaded in the application for constant sharing to enable object interface recognition.