Getting the "spaceball" demo to build properly in Windows
[freeglut] / progs / demos / spaceball / vmath.inl
index 0284a11..5b1871e 100644 (file)
@@ -1,5 +1,5 @@
 /* vector functions */\r
-static inline vec3_t v3_cons(float x, float y, float z)\r
+static INLINE vec3_t v3_cons(float x, float y, float z)\r
 {\r
   vec3_t res;\r
   res.x = x;\r
@@ -8,7 +8,7 @@ static inline vec3_t v3_cons(float x, float y, float z)
   return res;\r
 }\r
 \r
-static inline vec3_t quat_vec(quat_t q)\r
+static INLINE vec3_t quat_vec(quat_t q)\r
 {\r
   vec3_t v;\r
   v.x = q.x;\r
@@ -17,13 +17,13 @@ static inline vec3_t quat_vec(quat_t q)
   return v;\r
 }\r
 \r
-static inline float v3_dot(vec3_t v1, vec3_t v2)\r
+static INLINE float v3_dot(vec3_t v1, vec3_t v2)\r
 {\r
   return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z;\r
 }\r
 \r
 /* quaternion functions */\r
-static inline quat_t quat_cons(float s, float x, float y, float z)\r
+static INLINE quat_t quat_cons(float s, float x, float y, float z)\r
 {\r
   quat_t q;\r
   q.x = x;\r
@@ -33,7 +33,7 @@ static inline quat_t quat_cons(float s, float x, float y, float z)
   return q;\r
 }\r
 \r
-static inline quat_t quat_mul(quat_t q1, quat_t q2)\r
+static INLINE quat_t quat_mul(quat_t q1, quat_t q2)\r
 {\r
   quat_t res;\r
   vec3_t v1 = quat_vec(q1);\r
@@ -46,16 +46,16 @@ static inline quat_t quat_mul(quat_t q1, quat_t q2)
   return res;\r
 }\r
 \r
-static inline void quat_to_mat(mat4_t res, quat_t q)\r
+static INLINE void quat_to_mat(mat4_t res, quat_t q)\r
 {\r
-  m4_cons(res,  1.0 - 2.0 * q.y*q.y - 2.0 * q.z*q.z,  2.0 * q.x * q.y + 2.0 * q.w * q.z,    2.0 * q.z * q.x - 2.0 * q.w * q.y, 0,\r
-          2.0 * q.x * q.y - 2.0 * q.w * q.z,    1.0 - 2.0 * q.x*q.x - 2.0 * q.z*q.z,  2.0 * q.y * q.z + 2.0 * q.w * q.x, 0,\r
-          2.0 * q.z * q.x + 2.0 * q.w * q.y,    2.0 * q.y * q.z - 2.0 * q.w * q.x,    1.0 - 2.0 * q.x*q.x - 2.0 * q.y*q.y, 0,\r
+  m4_cons(res,  1.0f - 2.0f * q.y*q.y - 2.0f * q.z*q.z,  2.0f * q.x * q.y + 2.0f * q.w * q.z,    2.0f * q.z * q.x - 2.0f * q.w * q.y, 0,\r
+          2.0f * q.x * q.y - 2.0f * q.w * q.z,    1.0f - 2.0f * q.x*q.x - 2.0f * q.z*q.z,  2.0f * q.y * q.z + 2.0f * q.w * q.x, 0,\r
+          2.0f * q.z * q.x + 2.0f * q.w * q.y,    2.0f * q.y * q.z - 2.0f * q.w * q.x,    1.0f - 2.0f * q.x*q.x - 2.0f * q.y*q.y, 0,\r
           0, 0, 0, 1);\r
 }\r
 \r
 /* matrix functions */\r
-static inline void m4_cons(mat4_t m,\r
+static INLINE void m4_cons(mat4_t m,\r
     float m11, float m12, float m13, float m14,\r
     float m21, float m22, float m23, float m24,\r
     float m31, float m32, float m33, float m34,\r