#include <algorithm>
#include <cmath>
#include <mt/exception.h>
Go to the source code of this file.
Typedefs | |
typedef float | mt::value_t |
typedef value_t | mt::Scalar |
This file contains a typedef for setting the scalar quantity representation to be used in the library. It is set by default to float, but other representations such as double and the BasicScalar<T> type provided in this library can be used as well. For example, for using doubles, the macro MT_USE_DOUBLES should be defined; for using BasicScalar<float>, the macro MT_USE_BASIC_SCALAR should be defined; and for using BasicScalar<float>, both MT_USE_DOUBLES and MT_USE_BASIC_SCALAR should be defined.
Additionally, a few convenience methods for operating on scalar quantities are provided.
By setting MT_USE_BASIC_SCALAR, numeric checks are enabled throughout the library that increase its robustness. As examples, when constructing a plane with three points, it is checked that they are not collinear, and when setting a unit quaternion from a rotation matrix, its determinant is checked to be unity.