From 2000 to 2002 I developed a simple math library and used various forms of it in my Vision game engines. It evolved over time to support other projects and platforms, but I wanted to post an early view of it here for posterity.



Features

This library contains a collection of building blocks that are found in most larger math libraries, including:

  1. Linear algebra: vector2, vector3, vector4, matrix2, matrix3, matrix4, quaternion, point, plane

  2. Non-linear algebra: curves, surfaces, paths

  3. Geometry: frustum, camera, spheres, bounds, aabb, rbb, bsp-tree, kd-tree, quad-tree, oct-tree

  4. Numeric: random, hash, alignment, fast log, inv sqrt, principal component analysis

  5. Intersect: collision detection, ray casting

  6. Statistics: estimate, regressions, linear least squares, mean, deviation, variance, covariance



Downloads

  Math Library Source Code (17 KB)
  Math Library Source Code