*******************************************************************************/
-#ifndef _MATH_HH_
-#define _MATH_HH_
+#ifndef _MOOF_MATH_HH_
+#define _MOOF_MATH_HH_
/**
- * @file math.hh
+ * @file Math.hh
* General math-related types and functions.
*/
#include <cmath>
#include <cml/cml.h>
-#include <iostream>
-
-namespace dc {
+namespace Mf {
// Basic types.
-typedef float scalar; ///< Scalar type.
+typedef float Scalar; ///< Scalar type.
-typedef cml::vector2f vector2;
-typedef cml::vector3f vector3;
-typedef cml::vector4f vector4;
+typedef cml::vector2f Vector2;
+typedef cml::vector3f Vector3;
+typedef cml::vector4f Vector4;
-typedef cml::matrix33f_c matrix3;
-typedef cml::matrix44f_c matrix4;
+typedef cml::matrix33f_c Matrix3;
+typedef cml::matrix44f_c Matrix4;
-typedef cml::quaternionf_p quaternion;
+typedef cml::quaternionf_p Quaternion;
-typedef vector4 color;
+typedef Vector4 Color;
-const scalar default_epsilon = 0.00001;
+const Scalar EPSILON = 0.000001f;
/**
* Check the equality of scalars with a certain degree of error allowed.
*/
-inline bool equals(scalar a, scalar b, scalar epsilon = default_epsilon)
+inline bool checkEquality(Scalar a, Scalar b, Scalar epsilon = EPSILON)
{
return std::abs(a - b) < epsilon;
}
-} // namespace dc
+} // namespace Mf
-#endif // _MATH_HH_
+#endif // _MOOF_MATH_HH_
/** vim: set ts=4 sw=4 tw=80: *************************************************/