goat3d

diff libs/vmath/quat.h @ 28:9ba3e2fb8a33

modified vmath to work with vs2012, still memory corruptions in 3dsmax...
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 29 Sep 2013 08:46:19 +0300
parents 4deb0b12fe14
children
line diff
     1.1 --- a/libs/vmath/quat.h	Sun Sep 29 08:20:19 2013 +0300
     1.2 +++ b/libs/vmath/quat.h	Sun Sep 29 08:46:19 2013 +0300
     1.3 @@ -37,21 +37,21 @@
     1.4  #define quat_sub		v4_sub
     1.5  #define quat_neg		v4_neg
     1.6  
     1.7 -static inline quat_t quat_mul(quat_t q1, quat_t q2);
     1.8 +static VMATH_INLINE quat_t quat_mul(quat_t q1, quat_t q2);
     1.9  
    1.10 -static inline quat_t quat_conjugate(quat_t q);
    1.11 +static VMATH_INLINE quat_t quat_conjugate(quat_t q);
    1.12  
    1.13  #define quat_length		v4_length
    1.14  #define quat_length_sq	v4_length_sq
    1.15  
    1.16  #define quat_normalize	v4_normalize
    1.17 -static inline quat_t quat_inverse(quat_t q);
    1.18 +static VMATH_INLINE quat_t quat_inverse(quat_t q);
    1.19  
    1.20  quat_t quat_rotate(quat_t q, scalar_t angle, scalar_t x, scalar_t y, scalar_t z);
    1.21  quat_t quat_rotate_quat(quat_t q, quat_t rotq);
    1.22  
    1.23 -static inline void quat_to_mat3(mat3_t res, quat_t q);
    1.24 -static inline void quat_to_mat4(mat4_t res, quat_t q);
    1.25 +static VMATH_INLINE void quat_to_mat3(mat3_t res, quat_t q);
    1.26 +static VMATH_INLINE void quat_to_mat4(mat4_t res, quat_t q);
    1.27  
    1.28  #define quat_lerp quat_slerp
    1.29  quat_t quat_slerp(quat_t q1, quat_t q2, scalar_t t);
    1.30 @@ -107,7 +107,7 @@
    1.31  };
    1.32  
    1.33  Quaternion slerp(const Quaternion &q1, const Quaternion &q2, scalar_t t);
    1.34 -inline Quaternion lerp(const Quaternion &q1, const Quaternion &q2, scalar_t t);
    1.35 +VMATH_INLINE Quaternion lerp(const Quaternion &q1, const Quaternion &q2, scalar_t t);
    1.36  
    1.37  std::ostream &operator <<(std::ostream &out, const Quaternion &q);
    1.38