A C math library targeted at games
C C++ Java CMake Python Lua
Permalink
Failed to load latest commit information.
bin Switch unittest++ for standalone kaztest (only requires Python) May 21, 2016
cmake_modules Install the cmake module to a better location Feb 1, 2013
debian Fix packaging bug Mar 27, 2011
docs Removed redundant semicolons. Jan 6, 2014
java BACKWARDS INCOMPATIBLE. Massive refactor/cleanup of the kmMat3 functi… Nov 5, 2015
kazmath Fix kmVec3ProjectOnToPlane which was just broken :/ Aug 20, 2016
kazmathxx removed unnecessary comment Jul 16, 2014
lua Use FindLua51 cmake module. Disable building if not available Aug 11, 2016
test-apps Example fix for Library change Jan 17, 2014
tests Add a test for projecting a point onto a plane Aug 20, 2016
.gitignore Switch unittest++ for standalone kaztest (only requires Python) May 21, 2016
AUTHORS.md Add an authors file May 1, 2014
Android.mk Make the Android.mk work in more situations Aug 2, 2014
CMakeLists.txt Merge branch 'master' of https://github.com/rocaltair/kazmath into ro… Aug 11, 2016
ChangeLog Reinstated changelog Jan 17, 2011
LICENSE.md Add a readme, move the license to a License file Apr 30, 2014
README.md Cheekily add a DOGE donation address to the readme Jun 15, 2014
kazmath.config Changed all occurrences of // line comments into /* ... */ line comme… Jun 5, 2014
kazmath.creator Add RPM packaging info to CMake (doesn't work on F18). Fix the kmMat3… Jan 23, 2013
kazmath.files Merge branch 'master' of https://github.com/rocaltair/kazmath into ro… Aug 11, 2016
kazmath.includes Slight tweak to silence a compiler warning Jan 15, 2015
kazmath.recipe Add kazmath LP recipe Jan 17, 2011

README.md

Kazmath

Kazmath is a simple 3D maths library written in C. It was initially coded for use in my book, Beginning OpenGL Game Programming - Second edition, but rapidly gained a life of its own. Kazmath is now used by many different projects, and apparently is used in 25% of the worlds mobile games (yeah, I don't believe it either - but it's used in Cocoas2d-x).

If you are using Kazmath in a project, I'd be happy to hear about it. Find me on Twitter as @kazade.

Compiling

Compiling is simple using CMake, on Linux:

mkdir build
cd build
cmake ..
make
sudo make install

On other platforms use CMake to generate an appropriate project file.

If you want to build shared libraries you should pass -DBUILD_SHARED_LIBS=YES to the cmake command

Contributing

There are many improvements that could be made to kazmath, including:

  • More tests
  • More optimizations
  • More functions, and primitives
  • More bindings (e.g. Python)

All contributions are welcome. Just send me a pull request on GitHub and I'll review and probably merge!

Donations

If you like what I do, I'm happy to receive donations in DOGE to this address: D6uwEfChxWmWjFGs4jT8VRtabYaza5oAGx :)

Thank you!