]> Dogcows Code - chaz/yoink/blobdiff - src/math.hh
now using cml for vectors and math stuff
[chaz/yoink] / src / math.hh
index 78f4efdba03535b3382c151674710ad737cfcc07..313ecc1c09fa8b036821cc4871d31f6b06b8957a 100644 (file)
 
 *******************************************************************************/
 
+#ifndef _MATH_HH_
+#define _MATH_HH_
+
 /**
  * @file math.hh
  * General math-related types and functions.
  */
 
-#ifndef _MATH_HH_
-#define _MATH_HH_
-
 #include <cmath>
+#include <cml/cml.h>
 
 
 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_
 
This page took 0.023401 seconds and 4 git commands to generate.