]> Dogcows Code - chaz/yoink/blobdiff - src/moof/math.hh
pch support
[chaz/yoink] / src / moof / math.hh
index e7cd3f03951f873c04ec37dcb3e02a91993f78e6..e72dec0bbd1853992131253f7e2ef7da4203efd0 100644 (file)
 #ifndef _MOOF_MATH_HH_
 #define _MOOF_MATH_HH_
 
-/**
- * \file math.hh
- * General math-related types and functions.
- */
+#include <cmath>
+
+#include <boost/shared_ptr.hpp>
+#include <SDL/SDL_opengl.h>
+
+#include <cml/cml.h>
 
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <cmath>
-
-#include <cml/cml.h>
-#include <SDL/SDL_opengl.h>
 
 #if ENABLE_DOUBLE_PRECISION
 typedef GLdouble       GLscalar;
@@ -35,6 +33,11 @@ typedef GLfloat              GLscalar;
 #endif
 
 
+/**
+ * \file math.hh
+ * General math-related types and functions.
+ */
+
 namespace moof {
 
 
@@ -137,7 +140,7 @@ inline void rk4(S& state, scalar t, scalar dt)
        D b = evaluate<S,D>(state, t, dt * SCALAR(0.5), a);
        D c = evaluate<S,D>(state, t, dt * SCALAR(0.5), b);
        D d = evaluate<S,D>(state, t, dt, c);
-       state.step((a + (b + c) * SCALAR(2.0) + d) * SCALAR(1.0/6.0), dt);
+       state.step((a + (b + c) * SCALAR(2.0) + d) * (SCALAR(1.0)/SCALAR(6.0)), dt);
 }
 
 
This page took 0.01776 seconds and 4 git commands to generate.