> We have a 'divide by zero' situation in simgear/math/vector.cxx, but I'm > sure what the right fix is. Here's the offending routine:
Nah. > double dd = sgdScalarProductVec3(d, d); > double tmp = ud / dd; Personally, I'd stick an assert in there that dd must always be positive. It is nonsensical to call this function when the direction vector is zero. The whole point of a direction vector is that it has non-zero length. We can patch the problem, against callers who are passing bad information, by simply not bothering to do the division if we don't like the answer. However, that simply means we hand back a wrong answer for broken code, instead of firing an assert that would get the broken code fixed. We can extend the definition of the function, by stating that there is defined behavior when a zero vector is passed. However, that is going to be a discontinuous thing and I _strongly_ recommend against it. _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
