A library providing common linear algebra math operations.
See the documentation.
- Vector (float2/3/4, int2/3/4)
- Matrix (float2x2/3x3/4x4)
- Quaternion (float4)
- Euler angles, radians conversion
- Matrix translate, scale, rotate
- Pespective, orthographics projection
- Ray, line, plane, triangle, sphere...
- Axis aligned bounding box (AABB)
- Bounding volume hierarchy (BVH)
- Color conversion (RGBA, linear)
- Version (major, minor, patch, build)
- Hexadecimal string conversion
- Tone mapping, gamma correction
- Image based lighting (IBL, BRDF)
- Spherical harmonics (SH)
- Enum class flags declaration
- Simplified integer types (uint32, int8, etc)
- Windows
- macOS
- Ubuntu (Linux)
- C++17 compiler
- Git 2.30+
- CMake 3.16+
Use building instructions to install all required tools and libraries.
Name | Description | Default value |
---|---|---|
MATH_BUILD_SHARED | Build Math shared library | ON |
MATH_BUILD_TESTS | Build Math library tests | ON |
Name | Description | Windows | macOS | Linux |
---|---|---|---|---|
math-static | Static Math library | .lib |
.a |
.a |
math-shared | Dynamic Math library | .dll |
.dylib |
.so |
git clone https://github.com/cfnptr/math
- Windows:
./scripts/build-release.bat
- macOS / Ubuntu:
./scripts/build-release.sh