removed warning by returning zero vector when eulers_dot_of_rates reach a singularity - by the way, is the name of the function really good ?

This commit is contained in:
Antoine Drouin
2010-08-15 15:51:43 +00:00
parent 261c9c2afd
commit d35d9b8bbb
+5 -1
View File
@@ -763,7 +763,11 @@ struct Int64Vect3 {
(_ed).theta = INT_MULT_RSHIFT(cphi, (_r).q, INT32_TRIG_FRAC) - INT_MULT_RSHIFT(sphi, (_r).r, INT32_TRIG_FRAC); \
(_ed).psi = (int32_t)(((int64_t)sphi * (int64_t)(_r).q) / ctheta) + (int32_t)(((int64_t)cphi * (int64_t)(_r).r) / ctheta); \
} \
\
/* FIXME: What do you wanna do when you hit the singularity ? */ \
/* probably not return an uninitialized variable, or ? */ \
else { \
INT_EULERS_ZERO(_ed); \
} \
}
#define INT32_EULERS_DOT_OF_RATES(_ed, _e, _r) INT32_EULERS_DOT_321_OF_RATES(_ed, _e, _r)