HTTPS SSH

vg_math

Build status

What?

Yes. This is another Math library for C++.

  • operators and constructors are generated with python script
  • it's a bit faster than glm (according simple benchmark it's 1.5x faster)
  • simple embedding - only two files (header/cpp)
  • no special dependencies (only cmath and iostream - for printing)
  • simple API

Why?

  • other libraries doesn't offer advanced functions (like slerp, affineInverse etc.) and types like vec2, quat
  • GLM is huge, source code is less unreadable (template hell)
  • vg_math is tailored to my projects

How to use it?

There are two files vg_math.h and vg_math.cpp. Compile implementation file and link it to your project.

#include "vg_math.h"
vg::Vector3 a(1.0f, 0.5f, 0.72f);
vg::Vector3 b(1.0f, 0.5f, 0.72f);
auto c = a * b;
std::cout << c << std::endl;

Credits