Installation guides are provided for Linux and Windows:
These instructions should work on most Linux distributions.
The only requirement is the g++ compiler version 4 or later. Under Ubuntu, you can get g++ by installing the build-essential package.
Compiling is as simple as:
If you would like to install somewhere other than the default location, you can pass --prefix=/my_location to the configure script. The last step, make install, should be performed as root.
Link your program to mathhelper and the math library:
g++ MyProgram.cpp -lmathhelp -lm
A Visual Studio 2010 solution is provided to build MathHelper, named MathHelper.sln.
It should produce two files: libmathhelp.dll and libmathhelp.lib. If building the debug version, they'll be called libmathhelp_d.dll and libmathhelp_d.lib.
To use MathHelper, include MathHelper.hpp:
#include "MathHelper.hpp"
All classes, enumerations and constants belong to the MHTypes namespace. They can be accessed either by adding the namespace:
using namespace MHTypes;
or by specifying the scope:
MHTypes::Point3D myPoint;
The MathHelper classes use a custom variable type called MHFloat for their calculations. By default, MHFloat is a double. If you would like to set it to a different level of precision, you can find the definition in MHSettings.hpp:
typedef double MHFloat;
Be sure to recompile MathHelper after changing MHFloat.