https://github.com/kerberjg/lib-mathutils
Fast, SIMD optimized, cross-platform C++ math utility library
https://github.com/kerberjg/lib-mathutils
c-plus-plus gamedev-library math-library matrix-calculations rng simd-optimizations vector-math
Last synced: 4 months ago
JSON representation
Fast, SIMD optimized, cross-platform C++ math utility library
- Host: GitHub
- URL: https://github.com/kerberjg/lib-mathutils
- Owner: kerberjg
- License: gpl-2.0
- Created: 2014-10-20T18:34:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-10T19:36:25.000Z (over 8 years ago)
- Last Synced: 2025-01-05T13:13:42.370Z (6 months ago)
- Topics: c-plus-plus, gamedev-library, math-library, matrix-calculations, rng, simd-optimizations, vector-math
- Language: C++
- Homepage:
- Size: 92.8 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
lib-mathutils
=============A C++ math library heavily optimized for real time applications such as games.
**Status**: Work in progress!
## Features:
- Cached trigonometric functions (1MB of RAM, 99.9999% precision)
- Vector and matrix classes (Vec2, Vec3, Mat3, Mat4)
- Compile-time selection between "*fast*" and "*precise*" modes (read below)
- "Fast inverse square root" hack
- Operates on 32-bit floats by default
## Planned features:
- Big integers (128 and 256 bits)
- Big float (128 bit)
- SIMD optimizations### "Precise" and "Fast" modes
The default compilation mode is "fast". To enable the "precise" mode, you have to define the "PRECISE" macro in your compilation command.**Example**: (G++ and Clang)
```
-D PRECISE
```The precise mode disables caching of the trig functions as well as the `fast_inv_sqrt` hack.
It also switches to using 64bit floats instead of the 32bit ones.