X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmath.hh;h=313ecc1c09fa8b036821cc4871d31f6b06b8957a;hp=78f4efdba03535b3382c151674710ad737cfcc07;hb=0fffd0097d7b496454413e57b398c903ecc252e4;hpb=79b5f738f2e38acb60cda7e09f54802933a17105 diff --git a/src/math.hh b/src/math.hh index 78f4efd..313ecc1 100644 --- a/src/math.hh +++ b/src/math.hh @@ -26,21 +26,33 @@ *******************************************************************************/ +#ifndef _MATH_HH_ +#define _MATH_HH_ + /** * @file math.hh * General math-related types and functions. */ -#ifndef _MATH_HH_ -#define _MATH_HH_ - #include +#include namespace dc { -typedef double scalar; ///< Scalar variable. +typedef double scalar; ///< Scalar variable. + +typedef cml::vector2d vector2; +typedef cml::vector3d vector3; +typedef cml::vector4d vector4; + +typedef cml::matrix33d_c matrix3; +typedef cml::matrix44d_c matrix4; + +typedef cml::quaterniond_p quaternion; + +typedef cml::vector4f color; // Here's a simple way to check the equality of floating-point variables more @@ -61,6 +73,5 @@ inline bool equals(scalar a, scalar b, scalar epsilon = default_epsilon) } // namespace dc - #endif // _MATH_HH_