Header only generic vector and matrix math library. Applications could include physics engine, game engine, etc.
  • C++ 98.7%
  • Makefile 1.3%
Find a file
2026-10-06 13:01:57 +11:00
tests all tests for vec3 done, partially llm generated. clarified vec3 reflect 2026-10-06 12:57:45 +11:00
.gitignore don't track compile commands 2026-08-25 13:21:44 +10:00
Makefile initial tests setup and passing 2026-08-03 15:58:51 +10:00
README.md update progress 2026-10-06 13:01:57 +11:00
vecmat.hpp all tests for vec3 done, partially llm generated. clarified vec3 reflect 2026-10-06 12:57:45 +11:00

vecmat

Generic vector math library. Applications could include physics engine, game engine, etc.

Matrices are column-major.

Types:

  • Vec2
  • Vec3
  • Vec4
  • Mat2
  • Mat3
  • Mat4
  • Quat

Functions:

  • Vec2
    • operators: +,-,*,/,==,[]
    • len
    • len_sq
    • normalise
    • almost_equal
    • almost_zero
    • lerp
    • min
    • max
    • clamp (2)
    • abs
    • dist
    • dist_sq
    • project
    • rotate
    • perpendicularCW
    • perpendicularCCW
    • angle
    • perp_dot
    • dot
    • reflect
    • reflect_unit
  • Vec3
    • operators: +,-,*,/,==,[]
    • len
    • len_sq
    • normalise
    • almost_equal
    • almost_zero
    • lerp
    • min
    • max
    • clamp (2)
    • abs
    • dist
    • dist_sq
    • project
    • rotate
    • angle
    • orthonormal_basis_unit
    • cross
    • dot
    • reflect
    • reflect_unit

TODO:

  • vectors and vector funcs
  • matrices and matrix funcs
  • quaternions and quaternion funcs
  • vec2 tests
  • vec3 tests
  • vec4 tests
  • mat2 tests
  • mat3 tests
  • mat4 tests
  • quat tests